diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6b1f0ae62d4c..3372d9d26b69 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2591,7 +2591,7 @@ packages: version: 0.0.0 '@rush-temp/arm-containerservice-1@file:projects/arm-containerservice-1.tgz': - resolution: {integrity: sha512-H2yKeU6oHswQCWvTfwFbGFv75Wv2+8ebxqToOogIUvk/K4Qi8hZD6wYpeB79DZEfxdRbbVdd5Asn2qT5tOzInw==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-vgysgdhV82uv2nd8l9bKvJTJvaCEVyGTSMg1DBcAtRYlAMqcwgVygvYmeqty5MXNNAHDqBjYRomPsowMITy3QA==, tarball: file:projects/arm-containerservice-1.tgz} version: 0.0.0 '@rush-temp/arm-containerservice@file:projects/arm-containerservice.tgz': @@ -2787,7 +2787,7 @@ packages: version: 0.0.0 '@rush-temp/arm-frontdoor@file:projects/arm-frontdoor.tgz': - resolution: {integrity: sha512-SiVtNFWGXehLx10Lbt9/cMoAle28xZkD6sgIYRxN5DDNM1t0Ykh3mQzwswqSh1KZlRUsY53Hag1m39YlGL3OEQ==, tarball: file:projects/arm-frontdoor.tgz} + resolution: {integrity: sha512-v9xV1A8NZ8foTNuyswPdO0x6KhOviIt0EP8Yr4KiAbe6jjQW3enUF9pW6wmMoVd+RLwHze6Yqb2845fj70WQ6g==, tarball: file:projects/arm-frontdoor.tgz} version: 0.0.0 '@rush-temp/arm-graphservices@file:projects/arm-graphservices.tgz': @@ -3055,7 +3055,7 @@ packages: version: 0.0.0 '@rush-temp/arm-onlineexperimentation@file:projects/arm-onlineexperimentation.tgz': - resolution: {integrity: sha512-Ka51HXcNEvnUww7Esvt9pmOxtOgv+j8kzPLdhZNbxW6EIU421b17dogFm+R7eIuO0qmvyFU8uFSQvjBR1mOtMg==, tarball: file:projects/arm-onlineexperimentation.tgz} + resolution: {integrity: sha512-Vkh2S9ZAmS4zGSrBEG1dTaZIfX12rXpMsKp7wON09kOepFmTZB/baFSrirAVr95Z5Py9nssxxg9CqpCaG+ACDQ==, tarball: file:projects/arm-onlineexperimentation.tgz} version: 0.0.0 '@rush-temp/arm-operationalinsights@file:projects/arm-operationalinsights.tgz': @@ -3299,7 +3299,7 @@ packages: version: 0.0.0 '@rush-temp/arm-standbypool@file:projects/arm-standbypool.tgz': - resolution: {integrity: sha512-hPjDZihoXZyyh3Xx8WMytkWghTMax6FXVZhkSxui0/h/4PyJVYYoLUUW3D5SVYcQl199BiJTfL+lirMheaCC3w==, tarball: file:projects/arm-standbypool.tgz} + resolution: {integrity: sha512-X55eNz0DVw0Hg01VkpxiCtH98S4zEimC0DkZnrYTrdRpcvQCdGICwxN2HxpfOXJ87nRqpkFR+Q5hz491lqSvhA==, tarball: file:projects/arm-standbypool.tgz} version: 0.0.0 '@rush-temp/arm-storage-profile-2020-09-01-hybrid@file:projects/arm-storage-profile-2020-09-01-hybrid.tgz': @@ -17205,7 +17205,6 @@ snapshots: dotenv: 16.5.0 eslint: 9.25.0 playwright: 1.52.0 - prettier: 3.5.3 tslib: 2.8.1 typescript: 5.8.3 vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.86)(@vitest/browser@3.1.2)(tsx@4.19.3)(yaml@2.7.1) diff --git a/sdk/frontdoor/arm-frontdoor/LICENSE b/sdk/frontdoor/arm-frontdoor/LICENSE index b2f52a2bad4e..63447fd8bbbf 100644 --- a/sdk/frontdoor/arm-frontdoor/LICENSE +++ b/sdk/frontdoor/arm-frontdoor/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/frontdoor/arm-frontdoor/README.md b/sdk/frontdoor/arm-frontdoor/README.md index 0f317f16e130..7e61e51d02d9 100644 --- a/sdk/frontdoor/arm-frontdoor/README.md +++ b/sdk/frontdoor/arm-frontdoor/README.md @@ -6,7 +6,7 @@ FrontDoor Client [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/frontdoor/arm-frontdoor) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-frontdoor) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor) | +[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -44,7 +44,6 @@ npm install @azure/identity ``` 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). -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://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -64,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { FrontDoorManagementClient } from "@azure/arm-frontdoor"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", - clientId: "", -}); + clientId: "" + }); const client = new FrontDoorManagementClient(credential, subscriptionId); ``` ### JavaScript Bundle - 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). ## Key concepts @@ -109,7 +106,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) - [azure_cli]: https://learn.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ diff --git a/sdk/frontdoor/arm-frontdoor/_meta.json b/sdk/frontdoor/arm-frontdoor/_meta.json index b5c0c636cb3a..f995077ae36f 100644 --- a/sdk/frontdoor/arm-frontdoor/_meta.json +++ b/sdk/frontdoor/arm-frontdoor/_meta.json @@ -1,8 +1,8 @@ { - "commit": "b54ffc9278eff071455b1dbb4ad2e772afce885d", + "commit": "369da94c16ca6dc28552cab3f06b8fc23cde1d34", "readme": "specification/frontdoor/resource-manager/readme.md", - "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/typescript@6.0.20 --generate-sample=true", + "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", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.5", - "use": "@autorest/typescript@6.0.20" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.26", + "use": "@autorest/typescript@^6.0.12" +} \ No newline at end of file diff --git a/sdk/frontdoor/arm-frontdoor/api-extractor.json b/sdk/frontdoor/arm-frontdoor/api-extractor.json index 536a2e9198cb..92b2f353d0b7 100644 --- a/sdk/frontdoor/arm-frontdoor/api-extractor.json +++ b/sdk/frontdoor/arm-frontdoor/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "dist/esm/index.d.ts", + "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "dist/arm-frontdoor.d.ts" + "publicTrimmedFilePath": "./types/arm-frontdoor.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/frontdoor/arm-frontdoor/package.json b/sdk/frontdoor/arm-frontdoor/package.json index 3a56d2ad60c6..e338f4c17518 100644 --- a/sdk/frontdoor/arm-frontdoor/package.json +++ b/sdk/frontdoor/arm-frontdoor/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for FrontDoorManagementClient.", - "version": "5.3.1", + "version": "1.0.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", + "@azure/core-client": "^1.9.3", "@azure/core-lro": "^2.5.4", "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.18.2", + "@azure/core-rest-pipeline": "^1.19.1", "tslib": "^2.8.1" }, "keywords": [ @@ -21,29 +21,31 @@ "azure", "typescript", "browser", - "isomorphic", - "cloud" + "isomorphic" ], "license": "MIT", "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", + "module": "./dist-esm/src/index.js", "types": "./dist/commonjs/index.d.ts", "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", + "@azure/identity": "^4.9.1", "@azure/logger": "^1.1.4", "@types/node": "^18.0.0", "@vitest/browser": "^3.0.9", "@vitest/coverage-istanbul": "^3.0.9", "dotenv": "^16.0.0", - "playwright": "^1.50.1", + "playwright": "^1.52.0", "typescript": "~5.8.2", "vitest": "^3.0.9" }, - "repository": "github:Azure/azure-sdk-for-js", + "repository": { + "type": "git", + "url": "https://github.com/Azure/azure-sdk-for-js.git" + }, "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, @@ -69,7 +71,7 @@ "integration-test:browser": "echo skipped", "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", - "minify": "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", @@ -91,14 +93,6 @@ }, "autoPublish": true, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/frontdoor/arm-frontdoor", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-frontdoor?view=azure-node-preview" - }, "type": "module", "tshy": { "project": "./tsconfig.src.json", @@ -139,4 +133,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/frontdoor/arm-frontdoor/sample.env b/sdk/frontdoor/arm-frontdoor/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/frontdoor/arm-frontdoor/sample.env +++ b/sdk/frontdoor/arm-frontdoor/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts index db8a729dec7e..cdb49d44ec95 100644 --- a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts +++ b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts @@ -85,7 +85,7 @@ export class FrontDoorManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-frontdoor/5.3.1`; + const packageDetails = `azsdk-js-arm-frontdoor/1.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/frontdoor/arm-frontdoor/src/lroImpl.ts b/sdk/frontdoor/arm-frontdoor/src/lroImpl.ts index d8bc98987053..5f88efab981b 100644 --- a/sdk/frontdoor/arm-frontdoor/src/lroImpl.ts +++ b/sdk/frontdoor/arm-frontdoor/src/lroImpl.ts @@ -5,6 +5,10 @@ * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; diff --git a/sdk/frontdoor/arm-frontdoor/test/sampleTest.ts b/sdk/frontdoor/arm-frontdoor/test/sampleTest.ts new file mode 100644 index 000000000000..a1cf7c25afd2 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/test/sampleTest.ts @@ -0,0 +1,40 @@ +/* + * 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 { + Recorder, + RecorderStartOptions, +} from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { + 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", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); + await recorder.start(recorderOptions); + }); + + afterEach(async () => { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/frontdoor/arm-frontdoor/test/snippets.spec.ts b/sdk/frontdoor/arm-frontdoor/test/snippets.spec.ts index 133e7739dca8..f6bee431a3f0 100644 --- a/sdk/frontdoor/arm-frontdoor/test/snippets.spec.ts +++ b/sdk/frontdoor/arm-frontdoor/test/snippets.spec.ts @@ -1,15 +1,26 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +/* + * 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 { FrontDoorManagementClient } from "../src/index.js"; -import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; +import { + DefaultAzureCredential, + InteractiveBrowserCredential, +} from "@azure/identity"; import { setLogLevel } from "@azure/logger"; import { describe, it } from "vitest"; describe("snippets", () => { it("ReadmeSampleCreateClient_Node", async () => { const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new FrontDoorManagementClient(new DefaultAzureCredential(), subscriptionId); + const client = new FrontDoorManagementClient( + new DefaultAzureCredential(), + subscriptionId, + ); }); it("ReadmeSampleCreateClient_Browser", async () => { diff --git a/sdk/frontdoor/arm-frontdoor/tsconfig.browser.config.json b/sdk/frontdoor/arm-frontdoor/tsconfig.browser.config.json index 75871518e3a0..0c8bafa97126 100644 --- a/sdk/frontdoor/arm-frontdoor/tsconfig.browser.config.json +++ b/sdk/frontdoor/arm-frontdoor/tsconfig.browser.config.json @@ -1,3 +1,6 @@ { - "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] + "extends": [ + "./tsconfig.test.json", + "../../../tsconfig.browser.base.json" + ] } diff --git a/sdk/frontdoor/arm-frontdoor/tsconfig.json b/sdk/frontdoor/arm-frontdoor/tsconfig.json index 19ceb382b521..59ea83c046bf 100644 --- a/sdk/frontdoor/arm-frontdoor/tsconfig.json +++ b/sdk/frontdoor/arm-frontdoor/tsconfig.json @@ -3,11 +3,8 @@ { "path": "./tsconfig.src.json" }, - { - "path": "./tsconfig.samples.json" - }, { "path": "./tsconfig.test.json" } ] -} +} \ No newline at end of file diff --git a/sdk/frontdoor/arm-frontdoor/tsconfig.samples.json b/sdk/frontdoor/arm-frontdoor/tsconfig.samples.json index 6af66ad18f31..868c4e171468 100644 --- a/sdk/frontdoor/arm-frontdoor/tsconfig.samples.json +++ b/sdk/frontdoor/arm-frontdoor/tsconfig.samples.json @@ -2,7 +2,9 @@ "extends": "../../../tsconfig.samples.base.json", "compilerOptions": { "paths": { - "@azure/arm-frontdoor": ["./dist/esm"] + "@azure/arm-frontdoor": [ + "./dist/esm" + ] } } } diff --git a/sdk/frontdoor/arm-frontdoor/tsconfig.test.json b/sdk/frontdoor/arm-frontdoor/tsconfig.test.json index 290ca214aebc..3c2b783a8c1b 100644 --- a/sdk/frontdoor/arm-frontdoor/tsconfig.test.json +++ b/sdk/frontdoor/arm-frontdoor/tsconfig.test.json @@ -1,3 +1,6 @@ { - "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] } diff --git a/sdk/frontdoor/arm-frontdoor/vitest.browser.config.ts b/sdk/frontdoor/arm-frontdoor/vitest.browser.config.ts index 10e70dbfa8ee..182729ab5ce9 100644 --- a/sdk/frontdoor/arm-frontdoor/vitest.browser.config.ts +++ b/sdk/frontdoor/arm-frontdoor/vitest.browser.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,7 +9,7 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - include: ["dist-test/browser/test/**/*.spec.js"], + include: ["dist-test/browser/test/**/*.spec.js",], testTimeout: 1200000, hookTimeout: 1200000, }, diff --git a/sdk/frontdoor/arm-frontdoor/vitest.config.ts b/sdk/frontdoor/arm-frontdoor/vitest.config.ts index 86a71911ccc2..40e031385dd8 100644 --- a/sdk/frontdoor/arm-frontdoor/vitest.config.ts +++ b/sdk/frontdoor/arm-frontdoor/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. diff --git a/sdk/frontdoor/arm-frontdoor/vitest.esm.config.ts b/sdk/frontdoor/arm-frontdoor/vitest.esm.config.ts index 5e9735e9b144..a70127279fc9 100644 --- a/sdk/frontdoor/arm-frontdoor/vitest.esm.config.ts +++ b/sdk/frontdoor/arm-frontdoor/vitest.esm.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -5,4 +6,7 @@ import { mergeConfig } from "vitest/config"; import vitestConfig from "./vitest.config.ts"; import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; -export default mergeConfig(vitestConfig, vitestEsmConfig); +export default mergeConfig( + vitestConfig, + vitestEsmConfig +);