Skip to content

Commit

Permalink
CodeGen from PR 18313 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 78edca8f42555afcaf76538367c2993e0626d86e into bcc31e55442c9fea21243154b626dd720ddd3058
  • Loading branch information
SDKAuto committed Mar 18, 2022
1 parent 4a05255 commit 4cad66f
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 37 deletions.
44 changes: 30 additions & 14 deletions common/config/rush/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion sdk/eventhub/arm-eventhub/LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/arm-eventhub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions sdk/eventhub/arm-eventhub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"commit": "d710fb7f40338ca6ef00e0a9680be0a3d4cf5059",
"commit": "7ea2bc3bbd3574c1f3033a57d6da87fca26f6a4f",
"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"
}
25 changes: 19 additions & 6 deletions sdk/eventhub/arm-eventhub/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-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"
}
}
}
}
}
12 changes: 5 additions & 7 deletions sdk/eventhub/arm-eventhub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -29,22 +29,20 @@
"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",
"rimraf": "^3.0.0",
"@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": {
Expand Down Expand Up @@ -101,4 +99,4 @@
},
"sideEffects": false,
"autoPublish": true
}
}
2 changes: 1 addition & 1 deletion sdk/eventhub/arm-eventhub/src/eventHubManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
48 changes: 48 additions & 0 deletions sdk/eventhub/arm-eventhub/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -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!");
});
});
16 changes: 12 additions & 4 deletions sdk/eventhub/arm-eventhub/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
2 changes: 2 additions & 0 deletions sdk/eventhub/ci.mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions sdk/eventhub/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 4cad66f

Please sign in to comment.