Skip to content

Commit f4820dc

Browse files
author
SDKAuto
committed
CodeGen from PR 33305 in Azure/azure-rest-api-specs
Merge 8c63eb58911ea9d3e254a83616524563347829d0 into 7a5a8d753713d3db02d262128749427e98289887
1 parent 3f34a69 commit f4820dc

18 files changed

+137
-63
lines changed

common/config/rush/pnpm-lock.yaml

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

sdk/frontdoor/arm-frontdoor/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

sdk/frontdoor/arm-frontdoor/README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FrontDoor Client
66

77
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/frontdoor/arm-frontdoor) |
88
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-frontdoor) |
9-
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor) |
9+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor?view=azure-node-preview) |
1010
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
1111

1212
## Getting started
@@ -44,7 +44,6 @@ npm install @azure/identity
4444
```
4545

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

4948
For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
5049

@@ -64,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
6463
import { InteractiveBrowserCredential } from "@azure/identity";
6564
import { FrontDoorManagementClient } from "@azure/arm-frontdoor";
6665

67-
const subscriptionId = "00000000-0000-0000-0000-000000000000";
6866
const credential = new InteractiveBrowserCredential({
6967
tenantId: "<YOUR_TENANT_ID>",
70-
clientId: "<YOUR_CLIENT_ID>",
71-
});
68+
clientId: "<YOUR_CLIENT_ID>"
69+
});
7270
const client = new FrontDoorManagementClient(credential, subscriptionId);
7371
```
7472

7573
### JavaScript Bundle
76-
7774
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).
7875

7976
## Key concepts
@@ -108,7 +105,7 @@ If you'd like to contribute to this library, please read the [contributing guide
108105

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

111-
108+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Ffrontdoor%2Farm-frontdoor%2FREADME.png)
112109

113110
[azure_cli]: https://learn.microsoft.com/cli/azure
114111
[azure_sub]: https://azure.microsoft.com/free/
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "b54ffc9278eff071455b1dbb4ad2e772afce885d",
2+
"commit": "2b69cf10827e9a6b9d70ed3ef12fc465500f676c",
33
"readme": "specification/frontdoor/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\frontdoor\\resource-manager\\readme.md --use=@autorest/[email protected].20 --generate-sample=true",
4+
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/frontdoor/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"release_tool": "@azure-tools/[email protected].5",
7-
"use": "@autorest/[email protected].20"
8-
}
6+
"release_tool": "@azure-tools/[email protected].23",
7+
"use": "@autorest/typescript@^6.0.12"
8+
}

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

Lines changed: 3 additions & 3 deletions
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": {
55
"enabled": true
66
},
@@ -11,7 +11,7 @@
1111
"dtsRollup": {
1212
"enabled": true,
1313
"untrimmedFilePath": "",
14-
"publicTrimmedFilePath": "dist/arm-frontdoor.d.ts"
14+
"publicTrimmedFilePath": "./types/arm-frontdoor.d.ts"
1515
},
1616
"messages": {
1717
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
2828
}
2929
}
3030
}
31-
}
31+
}

sdk/frontdoor/arm-frontdoor/package.json

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,49 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for FrontDoorManagementClient.",
6-
"version": "5.3.1",
6+
"version": "1.0.0-beta.1",
77
"engines": {
88
"node": ">=18.0.0"
99
},
1010
"dependencies": {
1111
"@azure/abort-controller": "^2.1.2",
1212
"@azure/core-auth": "^1.9.0",
13-
"@azure/core-client": "^1.9.2",
13+
"@azure/core-client": "^1.9.3",
1414
"@azure/core-lro": "^2.5.4",
1515
"@azure/core-paging": "^1.6.2",
16-
"@azure/core-rest-pipeline": "^1.18.2",
16+
"@azure/core-rest-pipeline": "^1.19.1",
1717
"tslib": "^2.8.1"
1818
},
1919
"keywords": [
2020
"node",
2121
"azure",
2222
"typescript",
2323
"browser",
24-
"isomorphic",
25-
"cloud"
24+
"isomorphic"
2625
],
2726
"license": "MIT",
2827
"main": "./dist/commonjs/index.js",
29-
"module": "./dist/esm/index.js",
28+
"module": "./dist-esm/src/index.js",
3029
"types": "./dist/commonjs/index.d.ts",
3130
"devDependencies": {
3231
"@azure-tools/test-credential": "^2.0.0",
3332
"@azure-tools/test-recorder": "^4.1.0",
3433
"@azure-tools/test-utils-vitest": "^1.0.0",
3534
"@azure/dev-tool": "^1.0.0",
36-
"@azure/identity": "^4.6.0",
35+
"@azure/identity": "^4.8.0",
3736
"@azure/logger": "^1.1.4",
3837
"@types/node": "^18.0.0",
3938
"@vitest/browser": "^3.0.9",
4039
"@vitest/coverage-istanbul": "^3.0.9",
4140
"dotenv": "^16.0.0",
42-
"playwright": "^1.50.1",
43-
"typescript": "~5.8.2",
41+
"playwright": "^1.51.1",
42+
"typescript": "~5.6.2",
4443
"vitest": "^3.0.9"
4544
},
46-
"repository": "github:Azure/azure-sdk-for-js",
45+
"repository": {
46+
"type": "git",
47+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
48+
},
4749
"bugs": {
4850
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
4951
},
@@ -91,14 +93,6 @@
9193
},
9294
"autoPublish": true,
9395
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/frontdoor/arm-frontdoor",
94-
"//sampleConfiguration": {
95-
"productName": "",
96-
"productSlugs": [
97-
"azure"
98-
],
99-
"disableDocsMs": true,
100-
"apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor?view=azure-node-preview"
101-
},
10296
"type": "module",
10397
"tshy": {
10498
"project": "./tsconfig.src.json",
@@ -139,4 +133,4 @@
139133
}
140134
}
141135
}
142-
}
136+
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# App registration secret for AAD authentication
2-
AZURE_CLIENT_SECRET=
3-
AZURE_CLIENT_ID=
4-
AZURE_TENANT_ID=
1+
# Feel free to add your own environment variables.

sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient {
8585
credential: credentials,
8686
};
8787

88-
const packageDetails = `azsdk-js-arm-frontdoor/5.3.1`;
88+
const packageDetails = `azsdk-js-arm-frontdoor/1.0.0-beta.1`;
8989
const userAgentPrefix =
9090
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
9191
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`

sdk/frontdoor/arm-frontdoor/src/lroImpl.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
*/
8+
9+
// Copyright (c) Microsoft Corporation.
10+
// Licensed under the MIT License.
11+
812
import { AbortSignalLike } from "@azure/abort-controller";
913
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
1014

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
import {
10+
Recorder,
11+
RecorderStartOptions,
12+
} from "@azure-tools/test-recorder";
13+
14+
const replaceableVariables: Record<string, string> = {
15+
AZURE_CLIENT_ID: "azure_client_id",
16+
AZURE_CLIENT_SECRET: "azure_client_secret",
17+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
18+
SUBSCRIPTION_ID: "azure_subscription_id",
19+
};
20+
21+
const recorderOptions: RecorderStartOptions = {
22+
envSetupForPlayback: replaceableVariables,
23+
};
24+
25+
describe("My test", () => {
26+
let recorder: Recorder;
27+
28+
beforeEach(async (ctx) => {
29+
recorder = new Recorder(ctx);
30+
await recorder.start(recorderOptions);
31+
});
32+
33+
afterEach(async () => {
34+
await recorder.stop();
35+
});
36+
37+
it("sample test", async function () {
38+
console.log("Hi, I'm a test!");
39+
});
40+
});

sdk/frontdoor/arm-frontdoor/test/snippets.spec.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
19
// Copyright (c) Microsoft Corporation.
210
// Licensed under the MIT License.
311

412
import { FrontDoorManagementClient } from "../src/index.js";
5-
import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity";
13+
import {
14+
DefaultAzureCredential,
15+
InteractiveBrowserCredential,
16+
} from "@azure/identity";
617
import { setLogLevel } from "@azure/logger";
718
import { describe, it } from "vitest";
819

920
describe("snippets", () => {
1021
it("ReadmeSampleCreateClient_Node", async () => {
1122
const subscriptionId = "00000000-0000-0000-0000-000000000000";
12-
const client = new FrontDoorManagementClient(new DefaultAzureCredential(), subscriptionId);
23+
const client = new FrontDoorManagementClient(
24+
new DefaultAzureCredential(),
25+
subscriptionId,
26+
);
1327
});
1428

1529
it("ReadmeSampleCreateClient_Browser", async () => {
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"]
2+
"extends": [
3+
"./tsconfig.test.json",
4+
"../../../tsconfig.browser.base.json"
5+
]
36
}
Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
{
2-
"references": [
3-
{
4-
"path": "./tsconfig.src.json"
5-
},
6-
{
7-
"path": "./tsconfig.samples.json"
8-
},
9-
{
10-
"path": "./tsconfig.test.json"
11-
}
2+
"compilerOptions": {
3+
"module": "es6",
4+
"moduleResolution": "node",
5+
"strict": true,
6+
"target": "es6",
7+
"sourceMap": true,
8+
"declarationMap": true,
9+
"esModuleInterop": true,
10+
"allowSyntheticDefaultImports": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"lib": [
13+
"es6",
14+
"dom"
15+
],
16+
"declaration": true,
17+
"outDir": "./dist-esm",
18+
"importHelpers": true
19+
},
20+
"include": [
21+
"src/**/*.ts",
22+
"test/**/*.ts"
23+
],
24+
"exclude": [
25+
"node_modules"
1226
]
13-
}
27+
}

sdk/frontdoor/arm-frontdoor/tsconfig.samples.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"extends": "../../../tsconfig.samples.base.json",
33
"compilerOptions": {
44
"paths": {
5-
"@azure/arm-frontdoor": ["./dist/esm"]
5+
"@azure/arm-frontdoor": [
6+
"./dist/esm"
7+
]
68
}
79
}
810
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"]
2+
"extends": [
3+
"./tsconfig.src.json",
4+
"../../../tsconfig.test.base.json"
5+
]
36
}

sdk/frontdoor/arm-frontdoor/vitest.browser.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
// Copyright (c) Microsoft Corporation.
23
// Licensed under the MIT License.
34

@@ -8,7 +9,7 @@ export default mergeConfig(
89
viteConfig,
910
defineConfig({
1011
test: {
11-
include: ["dist-test/browser/test/**/*.spec.js"],
12+
include: ["dist-test/browser/test/**/*.spec.js",],
1213
testTimeout: 1200000,
1314
hookTimeout: 1200000,
1415
},

0 commit comments

Comments
 (0)