Skip to content

Commit

Permalink
CodeGen from PR 31422 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 184f146575835b375d8ce9905c37d3853b075d53 into fdcf40595e792db3a048098504a568edc113b881
  • Loading branch information
SDKAuto committed Nov 27, 2024
1 parent aedb647 commit b18851c
Show file tree
Hide file tree
Showing 102 changed files with 5,225 additions and 8,605 deletions.
1,002 changes: 590 additions & 412 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions sdk/devopsinfrastructure/arm-devopsinfrastructure/CHANGELOG.md

This file was deleted.

39 changes: 16 additions & 23 deletions sdk/devopsinfrastructure/arm-devopsinfrastructure/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Azure ManagedDevOpsInfrastructure client library for JavaScript
# Azure DevOpsInfrastructure client library for JavaScript

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



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

- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-devopsinfrastructure)
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-devopsinfrastructure?view=azure-node-preview)

## Getting started

Expand All @@ -24,16 +24,16 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

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

Install the Azure ManagedDevOpsInfrastructure client library for JavaScript with `npm`:
Install the Azure DevOpsInfrastructure client library for JavaScript with `npm`:

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

### Create and authenticate a `ManagedDevOpsInfrastructure`
### Create and authenticate a `DevOpsInfrastructureClient`

To create a client object to access the Azure ManagedDevOpsInfrastructure API, you will need the `endpoint` of your Azure ManagedDevOpsInfrastructure resource and a `credential`. The Azure ManagedDevOpsInfrastructure client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure ManagedDevOpsInfrastructure resource in the [Azure Portal][azure_portal].
To create a client object to access the Azure DevOpsInfrastructure API, you will need the `endpoint` of your Azure DevOpsInfrastructure resource and a `credential`. The Azure DevOpsInfrastructure client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure DevOpsInfrastructure 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 @@ -43,25 +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 ManagedDevOpsInfrastructure** 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 DevOpsInfrastructure** 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 { ManagedDevOpsInfrastructure } = require("@azure/arm-devopsinfrastructure");
const { DevOpsInfrastructureClient } = require("@azure/arm-devopsinfrastructure");
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 ManagedDevOpsInfrastructure(new DefaultAzureCredential(), subscriptionId);
const client = new DevOpsInfrastructureClient(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 ManagedDevOpsInfrastructure(credential, subscriptionId);
// const client = new DevOpsInfrastructureClient(credential, subscriptionId);
```


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

## Key concepts

### ManagedDevOpsInfrastructure
### DevOpsInfrastructureClient

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

## Troubleshooting

Expand All @@ -87,9 +87,6 @@ setLogLevel("info");

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).

## Next steps

Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.

## Contributing

Expand All @@ -99,10 +96,6 @@ If you'd like to contribute to this library, please read the [contributing guide

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fdevopsinfrastructure%2Farm-devopsinfrastructure%2FREADME.png)

[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
Expand Down
8 changes: 0 additions & 8 deletions sdk/devopsinfrastructure/arm-devopsinfrastructure/_meta.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
{
"$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"
},
"mainEntryPointFilePath": "./dist/esm/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/arm-devopsinfrastructure.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" }
}
}
}
}
6 changes: 0 additions & 6 deletions sdk/devopsinfrastructure/arm-devopsinfrastructure/assets.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import azsdkEslint from "@azure/eslint-plugin-azure-sdk";

export default [
...azsdkEslint.configs.recommended,
{
rules: {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"@azure/azure-sdk/ts-package-json-module": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off",
"@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
"tsdoc/syntax": "warn"
}
}
];
166 changes: 81 additions & 85 deletions sdk/devopsinfrastructure/arm-devopsinfrastructure/package.json
Original file line number Diff line number Diff line change
@@ -1,114 +1,110 @@
{
"name": "@azure/arm-devopsinfrastructure",
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ManagedDevOpsInfrastructure.",
"version": "1.0.0-beta.2",
"description": "A generated SDK for DevOpsInfrastructureClient.",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-client": "^1.7.0",
"@azure/core-lro": "^2.5.4",
"@azure/core-paging": "^1.2.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
"sideEffects": false,
"autoPublish": false,
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts",
"./models": "./src/models/index.ts"
},
"dialects": [
"esm",
"commonjs"
],
"esmDialects": [
"browser",
"react-native"
],
"selfLink": false
},
"type": "module",
"keywords": [
"node",
"azure",
"cloud",
"typescript",
"browser",
"isomorphic"
],
"author": "Microsoft Corporation",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/arm-devopsinfrastructure.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^1.1.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^4.0.1",
"@types/chai": "^4.2.8",
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"chai": "^4.2.0",
"dotenv": "^16.0.0",
"esm": "^3.2.18",
"mocha": "^10.0.0",
"ts-node": "^10.0.0",
"typescript": "~5.6.2"
},
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
},
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"files": [
"dist/**/*.js",
"dist/**/*.js.map",
"dist/**/*.d.ts",
"dist/**/*.d.ts.map",
"dist-esm/**/*.js",
"dist-esm/**/*.js.map",
"dist-esm/**/*.d.ts",
"dist-esm/**/*.d.ts.map",
"src/**/*.ts",
"dist",
"README.md",
"LICENSE",
"tsconfig.json",
"review/*",
"CHANGELOG.md",
"types/*"
"CHANGELOG.md"
],
"scripts": {
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
"build:test": "echo skipped",
"check-format": "echo skipped",
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "dev-tool run extract-api",
"format": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
"lint": "echo skipped",
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"pack": "npm pack 2>&1",
"prepack": "npm run build",
"test": "npm run integration-test",
"test:browser": "echo skipped",
"test:node": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node",
"update-snippets": "echo skipped"
"sdk-type": "mgmt",
"repository": "github:Azure/azure-sdk-for-js",
"bugs": {
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"sideEffects": false,
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
"//metadata": {
"constantPaths": [
{
"path": "src/managedDevOpsInfrastructure.ts",
"prefix": "packageDetails"
"path": "src/api/devOpsInfrastructureContext.ts",
"prefix": "userAgentInfo"
}
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devopsinfrastructure/arm-devopsinfrastructure",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-devopsinfrastructure?view=azure-node-preview"
"dependencies": {
"@azure/core-util": "^1.9.2",
"@azure-rest/core-client": "^2.3.1",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.5.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.6.2",
"@azure/core-lro": "^3.1.0",
"@azure/abort-controller": "^2.1.2"
},
"devDependencies": {
"dotenv": "^16.0.0",
"@microsoft/api-extractor": "^7.40.3",
"@types/node": "^18.0.0",
"eslint": "^8.55.0",
"typescript": "~5.6.2",
"tshy": "^2.0.0",
"@azure/identity": "^4.2.1",
"@vitest/browser": "^2.0.5",
"@vitest/coverage-istanbul": "^2.0.5",
"playwright": "^1.41.2",
"vitest": "^2.0.5",
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/eslint-plugin-azure-sdk": "^3.0.0"
},
"scripts": {
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"extract-api": "dev-tool run vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"pack": "npm pack 2>&1",
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
"unit-test:browser": "npm run build:test && dev-tool run test:vitest --browser",
"unit-test:node": "dev-tool run test:vitest",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"build:samples": "echo skipped",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"execute:samples": "echo skipped",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ",
"generate:client": "echo skipped",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
"minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
"build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
"build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node",
"test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
"update-snippets": "echo skipped"
}
}
Loading

0 comments on commit b18851c

Please sign in to comment.