From acaedf4f518c6fbf230d7e283e369087168d2a5a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 18 Mar 2022 05:47:08 +0000 Subject: [PATCH] CodeGen from PR 18313 in Azure/azure-rest-api-specs Merge fbeda78d487a25681503490e459b4e43873ee525 into bcc31e55442c9fea21243154b626dd720ddd3058 --- common/config/rush/pnpm-lock.yaml | 44 +++++++++++------ sdk/eventhub/arm-eventhub/LICENSE | 2 +- sdk/eventhub/arm-eventhub/README.md | 2 +- sdk/eventhub/arm-eventhub/_meta.json | 7 +-- sdk/eventhub/arm-eventhub/api-extractor.json | 25 +++++++--- sdk/eventhub/arm-eventhub/package.json | 12 ++--- .../src/eventHubManagementClient.ts | 2 +- sdk/eventhub/arm-eventhub/test/sampleTest.ts | 48 +++++++++++++++++++ sdk/eventhub/arm-eventhub/tsconfig.json | 16 +++++-- sdk/eventhub/ci.mgmt.yml | 2 + sdk/eventhub/ci.yml | 2 + 11 files changed, 125 insertions(+), 37 deletions(-) create mode 100644 sdk/eventhub/arm-eventhub/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 40055629c861..0f370140c6e9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -645,6 +645,21 @@ packages: - supports-color dev: false + /@azure/arm-eventhub/5.0.0: + resolution: {integrity: sha512-ENVwQBIT2MGER0GcG+rI0Bg6RBGKpqyMkwwAEmsRqscrTVwjFpeoS2pysoyKJMvQCEMpgp/bzstLUvwoQD5/2Q==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.0.4 + '@azure/core-auth': 1.3.2 + '@azure/core-client': 1.5.0 + '@azure/core-lro': 2.2.3 + '@azure/core-paging': 1.2.1 + '@azure/core-rest-pipeline': 1.5.0 + tslib: 2.3.1 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/arm-storage/17.0.0: resolution: {integrity: sha512-WS9eT3/vDQ7a1z/8K5BkPhoAi0ilo94yCSws4KyWq6UIA3RaXBDpYYAlN0TOxad9rPeOnWXWcB9gLw3DmjZ4wg==} engines: {node: '>=12.0.0'} @@ -9038,7 +9053,7 @@ packages: dev: false file:projects/ai-form-recognizer.tgz: - resolution: {integrity: sha512-p5c3Fvz/1TsAf39TR5Ob1MKEeCRfnLTepqV1LW/Hq1VZQ1AGvRbPSZAaUX9KbLtmfas+T4RkAs2NLYagTV5YWw==, tarball: file:projects/ai-form-recognizer.tgz} + resolution: {integrity: sha512-8nfO8GUFtqYDD3IZqe/e2skZAdyrGmMILxiBu5J97qbpBEHtR78QWfaBwH0wQjwB3qYvqtyxKO76G3OXPaNTPw==, tarball: file:projects/ai-form-recognizer.tgz} name: '@rush-temp/ai-form-recognizer' version: 0.0.0 dependencies: @@ -10717,7 +10732,7 @@ packages: dev: false file:projects/arm-eventhub.tgz: - resolution: {integrity: sha512-PSXQZCbu3khNcog69nSkJIkxY5B/rrJrDzexztWggP8zv739TwQNKg4UU8bQ4D/FguT6lMaqLk/umLu+cQ9/Pg==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-4I7Ul8TmuO89gRx9q/5iN4r2ntAgwsSYIlotiePzMKkDM/SDSCzOH6bxt4lXIapBf2xaVo/9Fo6Z6vm4UmHvZg==, tarball: file:projects/arm-eventhub.tgz} name: '@rush-temp/arm-eventhub' version: 0.0.0 dependencies: @@ -10725,16 +10740,16 @@ packages: '@azure/arm-storage': 17.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1 - '@rollup/plugin-json': 4.1.0_rollup@2.67.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.67.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.1 @@ -11750,11 +11765,12 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-sfxCB/Jzd3T1hg/Lzn8jowP0QgvNSmgZfMazqQo2T+t0tgCml2c8cwzscIhPcqt5meE/e6YirRLrCSt1AiS+8Q==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-1zVsjQTCZ+Q3QJthO/OO3j3+nOOQLeT5Nlp7ADAxYNFxbQLX6cQvLqxwwnRbwkl2qj5TJaUuLpnH9t4bC3ZMow==, tarball: file:projects/arm-monitor.tgz} name: '@rush-temp/arm-monitor' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-eventhub': 5.0.0 '@azure/arm-storage': 17.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 @@ -14716,7 +14732,7 @@ packages: dev: false file:projects/data-tables.tgz: - resolution: {integrity: sha512-2cfUMl2pp6rxlhzwxWiTvxuR3rE7/6PnHFqemx0G3XhFPcjNVmG86akuP53lYbCfZzrJ4zfIuiAm+TDhCEVYcg==, tarball: file:projects/data-tables.tgz} + resolution: {integrity: sha512-+zq/iyIQMvsNStPKiIdnhkC2EZfg5sUJAJoSF8UO7J7mnpNNMGqKy83bgVct89h9RQJ8ffvLvj8qOD+BOz0P+w==, tarball: file:projects/data-tables.tgz} name: '@rush-temp/data-tables' version: 0.0.0 dependencies: @@ -14953,7 +14969,7 @@ packages: dev: false file:projects/event-hubs.tgz: - resolution: {integrity: sha512-opYvozUeyklN6hWR3v+QKZ/yADTfwHXKp81KqpQODwrHWI6UosjIKDuSI6NaBQl8YGLL+KCCW8RtSoNeLWLTnw==, tarball: file:projects/event-hubs.tgz} + resolution: {integrity: sha512-WB+YXTl5pugC7LFJojH/xLjFnP99t0VTU7dUNFHnCWFfqsd8zDwQkhnbcuIsDBzTwcH6yOrN12pHod6Gec89lA==, tarball: file:projects/event-hubs.tgz} name: '@rush-temp/event-hubs' version: 0.0.0 dependencies: @@ -15847,7 +15863,7 @@ packages: dev: false file:projects/opentelemetry-instrumentation-azure-sdk.tgz: - resolution: {integrity: sha512-VBSR9nowFkwZxweaxyAfHs5845rwQss3+lKzEkswtJ6/fapsdB3/yCyCgjSk/wjFIQ+TmR0L1E7uxq2mj9kIdg==, tarball: file:projects/opentelemetry-instrumentation-azure-sdk.tgz} + resolution: {integrity: sha512-/zqXms1lqA4XHzV+tTJGpUrpT7aikkmGbNfpBYlHu3WaoqBht8uSTvXX0eLqbeN9F/fGIy82DVt4OSSmCfxKKg==, tarball: file:projects/opentelemetry-instrumentation-azure-sdk.tgz} name: '@rush-temp/opentelemetry-instrumentation-azure-sdk' version: 0.0.0 dependencies: @@ -17355,7 +17371,7 @@ packages: dev: false file:projects/template.tgz: - resolution: {integrity: sha512-HFiYA5WMTZ5uV7heu6jS7nPDXibcYDUwYY9BmsgPkSewJqaZrFZGq7VsrpEsT5LrKpbWTN79sQJI8ziiyaIXWA==, tarball: file:projects/template.tgz} + resolution: {integrity: sha512-+Br/j0LW6HPO8FtcZA318RDXzwVmFvhoVTH2MyExmFcT2ZQ0taJtGd7HeW9IPHVKxVRnPAnSrv1dT5tnOgCy1w==, tarball: file:projects/template.tgz} name: '@rush-temp/template' version: 0.0.0 dependencies: @@ -17491,7 +17507,7 @@ packages: dev: false file:projects/test-utils.tgz: - resolution: {integrity: sha512-6YltGfIt/N0fCMBst9a1WUIdPHEd1P07BVbpdSywL40SvBUrIl5KPmupCINQAYHCf6BvExke3q712AwIb3BGcA==, tarball: file:projects/test-utils.tgz} + resolution: {integrity: sha512-qF48UapaRaIx/JiHpf1Qpqrx/ef89BjKdakW4mKBEQOLBmcSkyA0mDhfZDaKuDuzfxDar+wkz1AlW03FeP+cBg==, tarball: file:projects/test-utils.tgz} name: '@rush-temp/test-utils' version: 0.0.0 dependencies: diff --git a/sdk/eventhub/arm-eventhub/LICENSE b/sdk/eventhub/arm-eventhub/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/eventhub/arm-eventhub/LICENSE +++ b/sdk/eventhub/arm-eventhub/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/eventhub/arm-eventhub/README.md b/sdk/eventhub/arm-eventhub/README.md index 515409c1e257..3bb5c227a5ec 100644 --- a/sdk/eventhub/arm-eventhub/README.md +++ b/sdk/eventhub/arm-eventhub/README.md @@ -6,7 +6,7 @@ Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and Virt [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-eventhub) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-eventhub) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-eventhub?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/eventhub/arm-eventhub/_meta.json b/sdk/eventhub/arm-eventhub/_meta.json index f5aebbfc9fa4..5c1f5b9b99dd 100644 --- a/sdk/eventhub/arm-eventhub/_meta.json +++ b/sdk/eventhub/arm-eventhub/_meta.json @@ -1,7 +1,8 @@ { - "commit": "d710fb7f40338ca6ef00e0a9680be0a3d4cf5059", + "commit": "9697522ebd768a44c9c8c2e83cb07cd662ead70e", "readme": "specification/eventhub/resource-manager/readme.md", - "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/eventhub/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "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=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/eventhub/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.1.3", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/api-extractor.json b/sdk/eventhub/arm-eventhub/api-extractor.json index 32aeb099b712..76a8dc49b5c7 100644 --- a/sdk/eventhub/arm-eventhub/api-extractor.json +++ b/sdk/eventhub/arm-eventhub/api-extractor.json @@ -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-eventhub.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" + } } } -} +} \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/package.json b/sdk/eventhub/arm-eventhub/package.json index 311d216cb656..0af7be859f46 100644 --- a/sdk/eventhub/arm-eventhub/package.json +++ b/sdk/eventhub/arm-eventhub/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventHubManagementClient.", - "version": "5.0.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-eventhub.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.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", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -42,9 +42,7 @@ "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2", - "@azure/arm-network": "^26.0.0", - "@azure/arm-storage": "^17.0.0" + "cross-env": "^7.0.2" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventhub/arm-eventhub", "repository": { @@ -101,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts index ee6a8c7c45f5..f54ebbf272e9 100644 --- a/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts +++ b/sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts @@ -67,7 +67,7 @@ export class EventHubManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-eventhub/5.0.0`; + const packageDetails = `azsdk-js-arm-eventhub/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/eventhub/arm-eventhub/test/sampleTest.ts b/sdk/eventhub/arm-eventhub/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/eventhub/arm-eventhub/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/eventhub/arm-eventhub/tsconfig.json b/sdk/eventhub/arm-eventhub/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/eventhub/arm-eventhub/tsconfig.json +++ b/sdk/eventhub/arm-eventhub/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/eventhub/ci.mgmt.yml b/sdk/eventhub/ci.mgmt.yml index a39b3069f73c..4083d1cc8729 100644 --- a/sdk/eventhub/ci.mgmt.yml +++ b/sdk/eventhub/ci.mgmt.yml @@ -11,6 +11,7 @@ trigger: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/arm-eventhub/ - sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid + - sdk/eventhub/arm-eventhub pr: branches: include: @@ -25,6 +26,7 @@ pr: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/arm-eventhub/ - sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid + - sdk/eventhub/arm-eventhub extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventhub/ci.yml b/sdk/eventhub/ci.yml index f1ccbd0f3913..e3e43298b97a 100644 --- a/sdk/eventhub/ci.yml +++ b/sdk/eventhub/ci.yml @@ -13,6 +13,7 @@ trigger: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/arm-eventhub/ - sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid + - sdk/eventhub/arm-eventhub pr: branches: include: @@ -29,6 +30,7 @@ pr: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/arm-eventhub/ - sdk/eventhub/arm-eventhub-profile-2020-09-01-hybrid + - sdk/eventhub/arm-eventhub extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: