From ee0ea9ed58c9d964f1a6918bcead5bc13db0dcb6 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:55:48 +0800
Subject: [PATCH 01/62] Migration: Update package.json, tsconfig.json, and
api-extractor.json
---
.../arm-billingbenefits/api-extractor.json | 6 +-
.../arm-billingbenefits/package.json | 61 +++++++++++--------
.../arm-billingbenefits/tsconfig.json | 40 +++---------
.../arm-billingbenefits/tsconfig.samples.json | 10 +++
.../arm-billingbenefits/tsconfig.src.json | 3 +
.../arm-billingbenefits/tsconfig.test.json | 6 ++
6 files changed, 67 insertions(+), 59 deletions(-)
create mode 100644 sdk/billingbenefits/arm-billingbenefits/tsconfig.samples.json
create mode 100644 sdk/billingbenefits/arm-billingbenefits/tsconfig.src.json
create mode 100644 sdk/billingbenefits/arm-billingbenefits/tsconfig.test.json
diff --git a/sdk/billingbenefits/arm-billingbenefits/api-extractor.json b/sdk/billingbenefits/arm-billingbenefits/api-extractor.json
index 0f9c6234f53f..4bbe033d0b44 100644
--- a/sdk/billingbenefits/arm-billingbenefits/api-extractor.json
+++ b/sdk/billingbenefits/arm-billingbenefits/api-extractor.json
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
- "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
@@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
- "publicTrimmedFilePath": "./types/arm-billingbenefits.d.ts"
+ "publicTrimmedFilePath": "dist/arm-billingbenefits.d.ts"
},
"messages": {
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/sdk/billingbenefits/arm-billingbenefits/package.json b/sdk/billingbenefits/arm-billingbenefits/package.json
index 7a748d57fc7f..fc1eac54afa4 100644
--- a/sdk/billingbenefits/arm-billingbenefits/package.json
+++ b/sdk/billingbenefits/arm-billingbenefits/package.json
@@ -28,17 +28,17 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-billingbenefits.d.ts",
"devDependencies": {
- "@azure-tools/test-credential": "^1.0.0",
- "@azure-tools/test-recorder": "^3.0.0",
+ "@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.0.1",
- "@types/chai": "^4.2.8",
- "@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
- "chai": "^4.2.0",
- "mocha": "^11.0.2",
- "ts-node": "^10.0.0",
- "typescript": "~5.7.2"
+ "@vitest/browser": "^2.1.8",
+ "@vitest/coverage-istanbul": "^2.1.8",
+ "playwright": "^1.49.1",
+ "typescript": "~5.7.2",
+ "vitest": "^2.1.8"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/billingbenefits/arm-billingbenefits",
"repository": {
@@ -49,24 +49,14 @@
"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/*"
+ "review/",
+ "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": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
@@ -78,7 +68,7 @@
"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'",
+ "integration-test:node": "dev-tool run test:vitest --esm",
"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",
@@ -87,8 +77,8 @@
"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",
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
+ "unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"sideEffects": false,
@@ -108,5 +98,24 @@
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-billingbenefits?view=azure-node-preview"
- }
+ },
+ "type": "module",
+ "tshy": {
+ "project": "./tsconfig.src.json",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ },
+ "dialects": [
+ "esm",
+ "commonjs"
+ ],
+ "esmDialects": [
+ "browser",
+ "react-native"
+ ],
+ "selfLink": false
+ },
+ "browser": "./dist/browser/index.js",
+ "react-native": "./dist/react-native/index.js"
}
diff --git a/sdk/billingbenefits/arm-billingbenefits/tsconfig.json b/sdk/billingbenefits/arm-billingbenefits/tsconfig.json
index 760424f2c47c..19ceb382b521 100644
--- a/sdk/billingbenefits/arm-billingbenefits/tsconfig.json
+++ b/sdk/billingbenefits/arm-billingbenefits/tsconfig.json
@@ -1,33 +1,13 @@
{
- "compilerOptions": {
- "module": "es6",
- "moduleResolution": "node",
- "strict": true,
- "target": "es6",
- "sourceMap": true,
- "declarationMap": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "forceConsistentCasingInFileNames": true,
- "lib": [
- "es6",
- "dom"
- ],
- "declaration": true,
- "outDir": "./dist-esm",
- "importHelpers": true,
- "paths": {
- "@azure/arm-billingbenefits": [
- "./src/index"
- ]
+ "references": [
+ {
+ "path": "./tsconfig.src.json"
+ },
+ {
+ "path": "./tsconfig.samples.json"
+ },
+ {
+ "path": "./tsconfig.test.json"
}
- },
- "include": [
- "./src/**/*.ts",
- "./test/**/*.ts",
- "samples-dev/**/*.ts"
- ],
- "exclude": [
- "node_modules"
]
-}
\ No newline at end of file
+}
diff --git a/sdk/billingbenefits/arm-billingbenefits/tsconfig.samples.json b/sdk/billingbenefits/arm-billingbenefits/tsconfig.samples.json
new file mode 100644
index 000000000000..ac94cf8b7803
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/tsconfig.samples.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.samples.base.json",
+ "compilerOptions": {
+ "paths": {
+ "@azure/arm-billingbenefits": [
+ "./dist/esm"
+ ]
+ }
+ }
+}
diff --git a/sdk/billingbenefits/arm-billingbenefits/tsconfig.src.json b/sdk/billingbenefits/arm-billingbenefits/tsconfig.src.json
new file mode 100644
index 000000000000..bae70752dd38
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/tsconfig.src.json
@@ -0,0 +1,3 @@
+{
+ "extends": "../../../tsconfig.lib.json"
+}
diff --git a/sdk/billingbenefits/arm-billingbenefits/tsconfig.test.json b/sdk/billingbenefits/arm-billingbenefits/tsconfig.test.json
new file mode 100644
index 000000000000..3c2b783a8c1b
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/tsconfig.test.json
@@ -0,0 +1,6 @@
+{
+ "extends": [
+ "./tsconfig.src.json",
+ "../../../tsconfig.test.base.json"
+ ]
+}
From 6c836c42ac22339a1d6d9b47e015554b04a510af Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:55:48 +0800
Subject: [PATCH 02/62] Migration: Update test config
---
.../tsconfig.browser.config.json | 17 +++++++++++++++++
.../vitest.browser.config.ts | 17 +++++++++++++++++
.../arm-billingbenefits/vitest.config.ts | 7 +++++++
.../arm-billingbenefits/vitest.esm.config.ts | 12 ++++++++++++
4 files changed, 53 insertions(+)
create mode 100644 sdk/billingbenefits/arm-billingbenefits/tsconfig.browser.config.json
create mode 100644 sdk/billingbenefits/arm-billingbenefits/vitest.browser.config.ts
create mode 100644 sdk/billingbenefits/arm-billingbenefits/vitest.config.ts
create mode 100644 sdk/billingbenefits/arm-billingbenefits/vitest.esm.config.ts
diff --git a/sdk/billingbenefits/arm-billingbenefits/tsconfig.browser.config.json b/sdk/billingbenefits/arm-billingbenefits/tsconfig.browser.config.json
new file mode 100644
index 000000000000..b6586181d006
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/tsconfig.browser.config.json
@@ -0,0 +1,17 @@
+{
+ "extends": "./.tshy/build.json",
+ "include": [
+ "./src/**/*.ts",
+ "./src/**/*.mts",
+ "./test/**/*.spec.ts",
+ "./test/**/*.mts"
+ ],
+ "exclude": [
+ "./test/**/node/**/*.ts"
+ ],
+ "compilerOptions": {
+ "outDir": "./dist-test/browser",
+ "rootDir": ".",
+ "skipLibCheck": true
+ }
+}
diff --git a/sdk/billingbenefits/arm-billingbenefits/vitest.browser.config.ts b/sdk/billingbenefits/arm-billingbenefits/vitest.browser.config.ts
new file mode 100644
index 000000000000..b48c61b2ef46
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/vitest.browser.config.ts
@@ -0,0 +1,17 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { defineConfig, mergeConfig } from "vitest/config";
+import viteConfig from "../../../vitest.browser.shared.config.ts";
+
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ include: [
+ "dist-test/browser/test/**/*.spec.js",
+ ],
+ },
+ }),
+);
diff --git a/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts b/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts
new file mode 100644
index 000000000000..cc5cd85d4131
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts
@@ -0,0 +1,7 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import viteConfig from "../../../vitest.shared.config.ts";
+
+export default viteConfig;
diff --git a/sdk/billingbenefits/arm-billingbenefits/vitest.esm.config.ts b/sdk/billingbenefits/arm-billingbenefits/vitest.esm.config.ts
new file mode 100644
index 000000000000..a70127279fc9
--- /dev/null
+++ b/sdk/billingbenefits/arm-billingbenefits/vitest.esm.config.ts
@@ -0,0 +1,12 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { mergeConfig } from "vitest/config";
+import vitestConfig from "./vitest.config.ts";
+import vitestEsmConfig from "../../../vitest.esm.shared.config.ts";
+
+export default mergeConfig(
+ vitestConfig,
+ vitestEsmConfig
+);
From 3dd1a84aecb0b0b822f7ea141fb8fb0b55ed9127 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:55:49 +0800
Subject: [PATCH 03/62] Migration: Clean up files
From 3207adb58e65c79caad4e3130f6d255879f5a11d Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:05 +0800
Subject: [PATCH 04/62] Migration: Apply codemod: "fixSourceFile"
---
.../arm-billingbenefits/src/billingBenefitsRP.ts | 10 +++++-----
sdk/billingbenefits/arm-billingbenefits/src/index.ts | 8 ++++----
.../arm-billingbenefits/src/models/parameters.ts | 2 +-
.../arm-billingbenefits/src/operations/index.ts | 10 +++++-----
.../arm-billingbenefits/src/operations/operations.ts | 12 ++++++------
.../src/operations/reservationOrderAlias.ts | 12 ++++++------
.../src/operations/savingsPlan.ts | 12 ++++++------
.../src/operations/savingsPlanOrder.ts | 12 ++++++------
.../src/operations/savingsPlanOrderAlias.ts | 12 ++++++------
.../src/operationsInterfaces/index.ts | 10 +++++-----
.../src/operationsInterfaces/operations.ts | 2 +-
.../operationsInterfaces/reservationOrderAlias.ts | 2 +-
.../src/operationsInterfaces/savingsPlan.ts | 2 +-
.../src/operationsInterfaces/savingsPlanOrder.ts | 2 +-
.../operationsInterfaces/savingsPlanOrderAlias.ts | 2 +-
.../arm-billingbenefits/test/sampleTest.ts | 10 +++-------
16 files changed, 58 insertions(+), 62 deletions(-)
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/billingBenefitsRP.ts b/sdk/billingbenefits/arm-billingbenefits/src/billingBenefitsRP.ts
index d712eee64cfe..564df6c9f066 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/billingBenefitsRP.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/billingBenefitsRP.ts
@@ -20,22 +20,22 @@ import {
SavingsPlanOrderImpl,
SavingsPlanImpl,
ReservationOrderAliasImpl
-} from "./operations";
+} from "./operations/index.js";
import {
Operations,
SavingsPlanOrderAlias,
SavingsPlanOrder,
SavingsPlan,
ReservationOrderAlias
-} from "./operationsInterfaces";
-import * as Parameters from "./models/parameters";
-import * as Mappers from "./models/mappers";
+} from "./operationsInterfaces/index.js";
+import * as Parameters from "./models/parameters.js";
+import * as Mappers from "./models/mappers.js";
import {
BillingBenefitsRPOptionalParams,
SavingsPlanPurchaseValidateRequest,
ValidatePurchaseOptionalParams,
ValidatePurchaseResponse
-} from "./models";
+} from "./models/index.js";
export class BillingBenefitsRP extends coreClient.ServiceClient {
$host: string;
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/index.ts b/sdk/billingbenefits/arm-billingbenefits/src/index.ts
index c4493eb5b870..7ba09b57770d 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/index.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/index.ts
@@ -7,7 +7,7 @@
*/
///
-export { getContinuationToken } from "./pagingHelper";
-export * from "./models";
-export { BillingBenefitsRP } from "./billingBenefitsRP";
-export * from "./operationsInterfaces";
+export { getContinuationToken } from "./pagingHelper.js";
+export * from "./models/index.js";
+export { BillingBenefitsRP } from "./billingBenefitsRP.js";
+export * from "./operationsInterfaces/index.js";
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/models/parameters.ts b/sdk/billingbenefits/arm-billingbenefits/src/models/parameters.ts
index f03f972e812c..1fdfb638a80e 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/models/parameters.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/models/parameters.ts
@@ -17,7 +17,7 @@ import {
SavingsPlanUpdateValidateRequest as SavingsPlanUpdateValidateRequestMapper,
SavingsPlanPurchaseValidateRequest as SavingsPlanPurchaseValidateRequestMapper,
ReservationOrderAliasRequest as ReservationOrderAliasRequestMapper
-} from "../models/mappers";
+} from "../models/mappers.js";
export const accept: OperationParameter = {
parameterPath: "accept",
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operations/index.ts b/sdk/billingbenefits/arm-billingbenefits/src/operations/index.ts
index 8d6c0252399e..85c0d6da87a1 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operations/index.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operations/index.ts
@@ -6,8 +6,8 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./operations";
-export * from "./savingsPlanOrderAlias";
-export * from "./savingsPlanOrder";
-export * from "./savingsPlan";
-export * from "./reservationOrderAlias";
+export * from "./operations.js";
+export * from "./savingsPlanOrderAlias.js";
+export * from "./savingsPlanOrder.js";
+export * from "./savingsPlan.js";
+export * from "./reservationOrderAlias.js";
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operations/operations.ts b/sdk/billingbenefits/arm-billingbenefits/src/operations/operations.ts
index 5d0cbb4957b7..bd5954f10695 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operations/operations.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operations/operations.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Operations } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Operations } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { BillingBenefitsRP } from "../billingBenefitsRP";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { BillingBenefitsRP } from "../billingBenefitsRP.js";
import {
Operation,
OperationsListNextOptionalParams,
OperationsListOptionalParams,
OperationsListResponse,
OperationsListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Operations operations. */
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operations/reservationOrderAlias.ts b/sdk/billingbenefits/arm-billingbenefits/src/operations/reservationOrderAlias.ts
index 0f5d5e487347..0a6b5c9d4174 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operations/reservationOrderAlias.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operations/reservationOrderAlias.ts
@@ -6,20 +6,20 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { ReservationOrderAlias } from "../operationsInterfaces";
+import { ReservationOrderAlias } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { BillingBenefitsRP } from "../billingBenefitsRP";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { BillingBenefitsRP } from "../billingBenefitsRP.js";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
-import { LroImpl } from "../lroImpl";
+import { LroImpl } from "../lroImpl.js";
import {
ReservationOrderAliasRequest,
ReservationOrderAliasCreateOptionalParams,
ReservationOrderAliasCreateResponse,
ReservationOrderAliasGetOptionalParams,
ReservationOrderAliasGetResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing ReservationOrderAlias operations. */
export class ReservationOrderAliasImpl implements ReservationOrderAlias {
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlan.ts b/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlan.ts
index 5f484e96245e..3673225a8721 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlan.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlan.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { SavingsPlan } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { SavingsPlan } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { BillingBenefitsRP } from "../billingBenefitsRP";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { BillingBenefitsRP } from "../billingBenefitsRP.js";
import {
SavingsPlanModel,
SavingsPlanListNextOptionalParams,
@@ -31,7 +31,7 @@ import {
SavingsPlanValidateUpdateResponse,
SavingsPlanListNextResponse,
SavingsPlanListAllNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing SavingsPlan operations. */
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrder.ts b/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrder.ts
index 5c6f03915255..63e78a4d6983 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrder.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrder.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { SavingsPlanOrder } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { SavingsPlanOrder } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { BillingBenefitsRP } from "../billingBenefitsRP";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { BillingBenefitsRP } from "../billingBenefitsRP.js";
import {
SavingsPlanOrderModel,
SavingsPlanOrderListNextOptionalParams,
@@ -23,7 +23,7 @@ import {
SavingsPlanOrderElevateOptionalParams,
SavingsPlanOrderElevateResponse,
SavingsPlanOrderListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing SavingsPlanOrder operations. */
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrderAlias.ts b/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrderAlias.ts
index 12cb47d1332a..4857ff39764c 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrderAlias.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operations/savingsPlanOrderAlias.ts
@@ -6,20 +6,20 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { SavingsPlanOrderAlias } from "../operationsInterfaces";
+import { SavingsPlanOrderAlias } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { BillingBenefitsRP } from "../billingBenefitsRP";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { BillingBenefitsRP } from "../billingBenefitsRP.js";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
-import { LroImpl } from "../lroImpl";
+import { LroImpl } from "../lroImpl.js";
import {
SavingsPlanOrderAliasModel,
SavingsPlanOrderAliasCreateOptionalParams,
SavingsPlanOrderAliasCreateResponse,
SavingsPlanOrderAliasGetOptionalParams,
SavingsPlanOrderAliasGetResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing SavingsPlanOrderAlias operations. */
export class SavingsPlanOrderAliasImpl implements SavingsPlanOrderAlias {
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/index.ts b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/index.ts
index 8d6c0252399e..85c0d6da87a1 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/index.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/index.ts
@@ -6,8 +6,8 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./operations";
-export * from "./savingsPlanOrderAlias";
-export * from "./savingsPlanOrder";
-export * from "./savingsPlan";
-export * from "./reservationOrderAlias";
+export * from "./operations.js";
+export * from "./savingsPlanOrderAlias.js";
+export * from "./savingsPlanOrder.js";
+export * from "./savingsPlan.js";
+export * from "./reservationOrderAlias.js";
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/operations.ts b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/operations.ts
index 05ec11883c07..05db8dec6a31 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/operations.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/operations.ts
@@ -7,7 +7,7 @@
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
-import { Operation, OperationsListOptionalParams } from "../models";
+import { Operation, OperationsListOptionalParams } from "../models/index.js";
///
/** Interface representing a Operations. */
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/reservationOrderAlias.ts b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/reservationOrderAlias.ts
index 239daa5f98f5..90c0f1e51dd6 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/reservationOrderAlias.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/reservationOrderAlias.ts
@@ -13,7 +13,7 @@ import {
ReservationOrderAliasCreateResponse,
ReservationOrderAliasGetOptionalParams,
ReservationOrderAliasGetResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a ReservationOrderAlias. */
export interface ReservationOrderAlias {
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlan.ts b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlan.ts
index 5953ab419b5d..95c450f5eaa7 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlan.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlan.ts
@@ -19,7 +19,7 @@ import {
SavingsPlanUpdateValidateRequest,
SavingsPlanValidateUpdateOptionalParams,
SavingsPlanValidateUpdateResponse
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a SavingsPlan. */
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrder.ts b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrder.ts
index 6962062467b2..ec42ad66b03d 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrder.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrder.ts
@@ -14,7 +14,7 @@ import {
SavingsPlanOrderGetResponse,
SavingsPlanOrderElevateOptionalParams,
SavingsPlanOrderElevateResponse
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a SavingsPlanOrder. */
diff --git a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrderAlias.ts b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrderAlias.ts
index 2584e03fa7df..c38960acd54c 100644
--- a/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrderAlias.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/src/operationsInterfaces/savingsPlanOrderAlias.ts
@@ -13,7 +13,7 @@ import {
SavingsPlanOrderAliasCreateResponse,
SavingsPlanOrderAliasGetOptionalParams,
SavingsPlanOrderAliasGetResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a SavingsPlanOrderAlias. */
export interface SavingsPlanOrderAlias {
diff --git a/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts b/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts
index 8ff7deb0acbe..f0d6ea6885e4 100644
--- a/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts
@@ -8,11 +8,7 @@
import {
Recorder,
- RecorderStartOptions,
- env
-} from "@azure-tools/test-recorder";
-import { assert } from "chai";
-import { Context } from "mocha";
+ RecorderStartOptions} from "@azure-tools/test-recorder";
const replaceableVariables: Record = {
AZURE_CLIENT_ID: "azure_client_id",
@@ -32,8 +28,8 @@ const recorderOptions: RecorderStartOptions = {
describe("My test", () => {
let recorder: Recorder;
- beforeEach(async function (this: Context) {
- recorder = new Recorder(this.currentTest);
+ beforeEach(async function (ctx) {
+ recorder = new Recorder(ctx);
await recorder.start(recorderOptions);
});
From d6a9ca82687c8d10ff8e1bb40f3727a4d77ccb22 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:06 +0800
Subject: [PATCH 05/62] Migration: Apply codemod: "fixTestingImports"
From ce596c584ed8bbe0caa81b010868c169e54c43bb Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:07 +0800
Subject: [PATCH 06/62] Migration: Apply codemod: "replaceAssertIsRejected"
From adb7b160c71378fcf9ec2b157848cf9412e36eaa Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:08 +0800
Subject: [PATCH 07/62] Migration: Apply codemod: "replaceSinonStub"
From 24c594f6bc6d914469b5fbb378a754460f1c7034 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:09 +0800
Subject: [PATCH 08/62] Migration: Apply codemod: "addViHelper"
From 93b109c1881e776aab609f92dd9b9a7ea3d90edc Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:09 +0800
Subject: [PATCH 09/62] Migration: Apply codemod: "replaceSupportTracing"
From ec8d719336c154720f7abf5c50d034cce8696ef7 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:10 +0800
Subject: [PATCH 10/62] Migration: Apply codemod: "replaceTestUtils"
From e7c1763f76b8798971ac883ec157ae039b8c77f2 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 14:56:25 +0800
Subject: [PATCH 11/62] Migration: rushx format
From 49c4055470418284f0109e3c147ebdcf6d71d403 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:02:25 +0800
Subject: [PATCH 12/62] update
---
common/config/rush/pnpm-lock.yaml | 36 ++++++++++++-------
.../arm-billingbenefits/package.json | 29 ++++++++++++---
2 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index 78970280806a..ea7980131aaa 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -153,7 +153,7 @@ importers:
version: file:projects/arm-billing.tgz
'@rush-temp/arm-billingbenefits':
specifier: file:./projects/arm-billingbenefits.tgz
- version: file:projects/arm-billingbenefits.tgz
+ version: file:projects/arm-billingbenefits.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-botservice':
specifier: file:./projects/arm-botservice.tgz
version: file:projects/arm-botservice.tgz
@@ -2675,7 +2675,7 @@ packages:
version: 0.0.0
'@rush-temp/arm-billingbenefits@file:projects/arm-billingbenefits.tgz':
- resolution: {integrity: sha512-GLJhlFc7juxNawCeZr2NjC4AWnjiIHU2PVHxpheyWS3FJ/RiBfFDcJPGV8lfnE7VJUr5rN5AmnYLof0oGklL+w==, tarball: file:projects/arm-billingbenefits.tgz}
+ resolution: {integrity: sha512-R4l815tS1k9Ko7Kk1g57o1zLvd3SxmmRRFWdTjcSpor1gxAlIMH6BbRRW5p+6i+o0Y4T1ZRZk88jp476VrmMWQ==, tarball: file:projects/arm-billingbenefits.tgz}
version: 0.0.0
'@rush-temp/arm-botservice@file:projects/arm-botservice.tgz':
@@ -11010,24 +11010,36 @@ snapshots:
- '@swc/wasm'
- supports-color
- '@rush-temp/arm-billingbenefits@file:projects/arm-billingbenefits.tgz':
+ '@rush-temp/arm-billingbenefits@file:projects/arm-billingbenefits.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))':
dependencies:
- '@azure-tools/test-credential': 1.3.1
- '@azure-tools/test-recorder': 3.5.2
'@azure/abort-controller': 1.1.0
'@azure/core-lro': 2.7.2
- '@types/chai': 4.3.20
- '@types/mocha': 10.0.10
'@types/node': 18.19.68
- chai: 4.5.0
- mocha: 11.0.2
- ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2)
+ '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)
+ '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8)
+ playwright: 1.49.1
tslib: 2.8.1
typescript: 5.7.2
+ vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))
transitivePeerDependencies:
- - '@swc/core'
- - '@swc/wasm'
+ - '@edge-runtime/vm'
+ - '@vitest/ui'
+ - bufferutil
+ - happy-dom
+ - jsdom
+ - less
+ - lightningcss
+ - msw
+ - safaridriver
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
- supports-color
+ - terser
+ - utf-8-validate
+ - vite
+ - webdriverio
'@rush-temp/arm-botservice@file:projects/arm-botservice.tgz':
dependencies:
diff --git a/sdk/billingbenefits/arm-billingbenefits/package.json b/sdk/billingbenefits/arm-billingbenefits/package.json
index fc1eac54afa4..9bb693d4e092 100644
--- a/sdk/billingbenefits/arm-billingbenefits/package.json
+++ b/sdk/billingbenefits/arm-billingbenefits/package.json
@@ -24,9 +24,9 @@
"isomorphic"
],
"license": "MIT",
- "main": "./dist/index.js",
- "module": "./dist-esm/src/index.js",
- "types": "./types/arm-billingbenefits.d.ts",
+ "main": "./dist/commonjs/index.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
@@ -117,5 +117,26 @@
"selfLink": false
},
"browser": "./dist/browser/index.js",
- "react-native": "./dist/react-native/index.js"
+ "react-native": "./dist/react-native/index.js",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "browser": {
+ "types": "./dist/browser/index.d.ts",
+ "default": "./dist/browser/index.js"
+ },
+ "react-native": {
+ "types": "./dist/react-native/index.d.ts",
+ "default": "./dist/react-native/index.js"
+ },
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ }
}
From 3ad8f98e6f8819fb57c76b787776b7fdbb2c9b4a Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:02 +0800
Subject: [PATCH 13/62] Migration: Update package.json, tsconfig.json, and
api-extractor.json
---
.../arm-botservice/api-extractor.json | 6 +-
sdk/botservice/arm-botservice/package.json | 61 +++++++++++--------
sdk/botservice/arm-botservice/tsconfig.json | 40 +++---------
.../arm-botservice/tsconfig.samples.json | 10 +++
.../arm-botservice/tsconfig.src.json | 3 +
.../arm-botservice/tsconfig.test.json | 6 ++
6 files changed, 67 insertions(+), 59 deletions(-)
create mode 100644 sdk/botservice/arm-botservice/tsconfig.samples.json
create mode 100644 sdk/botservice/arm-botservice/tsconfig.src.json
create mode 100644 sdk/botservice/arm-botservice/tsconfig.test.json
diff --git a/sdk/botservice/arm-botservice/api-extractor.json b/sdk/botservice/arm-botservice/api-extractor.json
index 90af16436306..a1c7fa075be9 100644
--- a/sdk/botservice/arm-botservice/api-extractor.json
+++ b/sdk/botservice/arm-botservice/api-extractor.json
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
- "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
@@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
- "publicTrimmedFilePath": "./types/arm-botservice.d.ts"
+ "publicTrimmedFilePath": "dist/arm-botservice.d.ts"
},
"messages": {
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json
index b2a26ef7dbdf..69df4e382015 100644
--- a/sdk/botservice/arm-botservice/package.json
+++ b/sdk/botservice/arm-botservice/package.json
@@ -28,18 +28,18 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-botservice.d.ts",
"devDependencies": {
- "@azure-tools/test-credential": "^1.0.0",
- "@azure-tools/test-recorder": "^3.0.0",
+ "@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.0.1",
- "@types/chai": "^4.2.8",
- "@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
- "chai": "^4.2.0",
+ "@vitest/browser": "^2.1.8",
+ "@vitest/coverage-istanbul": "^2.1.8",
"dotenv": "^16.0.0",
- "mocha": "^11.0.2",
- "ts-node": "^10.0.0",
- "typescript": "~5.7.2"
+ "playwright": "^1.49.1",
+ "typescript": "~5.7.2",
+ "vitest": "^2.1.8"
},
"repository": {
"type": "git",
@@ -49,24 +49,14 @@
"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/*"
+ "review/",
+ "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": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
@@ -78,7 +68,7 @@
"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'",
+ "integration-test:node": "dev-tool run test:vitest --esm",
"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",
@@ -87,8 +77,8 @@
"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",
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
+ "unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"sideEffects": false,
@@ -109,5 +99,24 @@
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-botservice?view=azure-node-preview"
- }
+ },
+ "type": "module",
+ "tshy": {
+ "project": "./tsconfig.src.json",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ },
+ "dialects": [
+ "esm",
+ "commonjs"
+ ],
+ "esmDialects": [
+ "browser",
+ "react-native"
+ ],
+ "selfLink": false
+ },
+ "browser": "./dist/browser/index.js",
+ "react-native": "./dist/react-native/index.js"
}
diff --git a/sdk/botservice/arm-botservice/tsconfig.json b/sdk/botservice/arm-botservice/tsconfig.json
index 78ba1b1ce969..19ceb382b521 100644
--- a/sdk/botservice/arm-botservice/tsconfig.json
+++ b/sdk/botservice/arm-botservice/tsconfig.json
@@ -1,33 +1,13 @@
{
- "compilerOptions": {
- "module": "es6",
- "moduleResolution": "node",
- "strict": true,
- "target": "es6",
- "sourceMap": true,
- "declarationMap": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "forceConsistentCasingInFileNames": true,
- "lib": [
- "es6",
- "dom"
- ],
- "declaration": true,
- "outDir": "./dist-esm",
- "importHelpers": true,
- "paths": {
- "@azure/arm-botservice": [
- "./src/index"
- ]
+ "references": [
+ {
+ "path": "./tsconfig.src.json"
+ },
+ {
+ "path": "./tsconfig.samples.json"
+ },
+ {
+ "path": "./tsconfig.test.json"
}
- },
- "include": [
- "./src/**/*.ts",
- "./test/**/*.ts",
- "samples-dev/**/*.ts"
- ],
- "exclude": [
- "node_modules"
]
-}
\ No newline at end of file
+}
diff --git a/sdk/botservice/arm-botservice/tsconfig.samples.json b/sdk/botservice/arm-botservice/tsconfig.samples.json
new file mode 100644
index 000000000000..f9408972b093
--- /dev/null
+++ b/sdk/botservice/arm-botservice/tsconfig.samples.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.samples.base.json",
+ "compilerOptions": {
+ "paths": {
+ "@azure/arm-botservice": [
+ "./dist/esm"
+ ]
+ }
+ }
+}
diff --git a/sdk/botservice/arm-botservice/tsconfig.src.json b/sdk/botservice/arm-botservice/tsconfig.src.json
new file mode 100644
index 000000000000..bae70752dd38
--- /dev/null
+++ b/sdk/botservice/arm-botservice/tsconfig.src.json
@@ -0,0 +1,3 @@
+{
+ "extends": "../../../tsconfig.lib.json"
+}
diff --git a/sdk/botservice/arm-botservice/tsconfig.test.json b/sdk/botservice/arm-botservice/tsconfig.test.json
new file mode 100644
index 000000000000..3c2b783a8c1b
--- /dev/null
+++ b/sdk/botservice/arm-botservice/tsconfig.test.json
@@ -0,0 +1,6 @@
+{
+ "extends": [
+ "./tsconfig.src.json",
+ "../../../tsconfig.test.base.json"
+ ]
+}
From 739be61da63c6ac73565fadc1eab6684245776ff Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:02 +0800
Subject: [PATCH 14/62] Migration: Update test config
---
.../arm-botservice/tsconfig.browser.config.json | 17 +++++++++++++++++
.../arm-botservice/vitest.browser.config.ts | 17 +++++++++++++++++
sdk/botservice/arm-botservice/vitest.config.ts | 7 +++++++
.../arm-botservice/vitest.esm.config.ts | 12 ++++++++++++
4 files changed, 53 insertions(+)
create mode 100644 sdk/botservice/arm-botservice/tsconfig.browser.config.json
create mode 100644 sdk/botservice/arm-botservice/vitest.browser.config.ts
create mode 100644 sdk/botservice/arm-botservice/vitest.config.ts
create mode 100644 sdk/botservice/arm-botservice/vitest.esm.config.ts
diff --git a/sdk/botservice/arm-botservice/tsconfig.browser.config.json b/sdk/botservice/arm-botservice/tsconfig.browser.config.json
new file mode 100644
index 000000000000..b6586181d006
--- /dev/null
+++ b/sdk/botservice/arm-botservice/tsconfig.browser.config.json
@@ -0,0 +1,17 @@
+{
+ "extends": "./.tshy/build.json",
+ "include": [
+ "./src/**/*.ts",
+ "./src/**/*.mts",
+ "./test/**/*.spec.ts",
+ "./test/**/*.mts"
+ ],
+ "exclude": [
+ "./test/**/node/**/*.ts"
+ ],
+ "compilerOptions": {
+ "outDir": "./dist-test/browser",
+ "rootDir": ".",
+ "skipLibCheck": true
+ }
+}
diff --git a/sdk/botservice/arm-botservice/vitest.browser.config.ts b/sdk/botservice/arm-botservice/vitest.browser.config.ts
new file mode 100644
index 000000000000..b48c61b2ef46
--- /dev/null
+++ b/sdk/botservice/arm-botservice/vitest.browser.config.ts
@@ -0,0 +1,17 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { defineConfig, mergeConfig } from "vitest/config";
+import viteConfig from "../../../vitest.browser.shared.config.ts";
+
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ include: [
+ "dist-test/browser/test/**/*.spec.js",
+ ],
+ },
+ }),
+);
diff --git a/sdk/botservice/arm-botservice/vitest.config.ts b/sdk/botservice/arm-botservice/vitest.config.ts
new file mode 100644
index 000000000000..cc5cd85d4131
--- /dev/null
+++ b/sdk/botservice/arm-botservice/vitest.config.ts
@@ -0,0 +1,7 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import viteConfig from "../../../vitest.shared.config.ts";
+
+export default viteConfig;
diff --git a/sdk/botservice/arm-botservice/vitest.esm.config.ts b/sdk/botservice/arm-botservice/vitest.esm.config.ts
new file mode 100644
index 000000000000..a70127279fc9
--- /dev/null
+++ b/sdk/botservice/arm-botservice/vitest.esm.config.ts
@@ -0,0 +1,12 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { mergeConfig } from "vitest/config";
+import vitestConfig from "./vitest.config.ts";
+import vitestEsmConfig from "../../../vitest.esm.shared.config.ts";
+
+export default mergeConfig(
+ vitestConfig,
+ vitestEsmConfig
+);
From 6de167121279a4034a2436232307b6b95e1d0725 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:03 +0800
Subject: [PATCH 15/62] Migration: Clean up files
From 01ab52b632993c4f682094596126e9dac825ef69 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:26 +0800
Subject: [PATCH 16/62] Migration: Apply codemod: "fixSourceFile"
---
.../samples-dev/botConnectionCreateSample.ts | 4 +---
.../samples-dev/botConnectionDeleteSample.ts | 4 +---
.../samples-dev/botConnectionGetSample.ts | 4 +---
.../botConnectionListByBotServiceSample.ts | 4 +---
...botConnectionListServiceProvidersSample.ts | 4 +---
.../botConnectionListWithSecretsSample.ts | 4 +---
.../samples-dev/botConnectionUpdateSample.ts | 4 +---
.../samples-dev/botsCreateSample.ts | 4 +---
.../samples-dev/botsDeleteSample.ts | 4 +---
.../botsGetCheckNameAvailabilitySample.ts | 4 +---
.../samples-dev/botsGetSample.ts | 4 +---
.../botsListByResourceGroupSample.ts | 4 +---
.../samples-dev/botsListSample.ts | 4 +---
.../samples-dev/botsUpdateSample.ts | 4 +---
.../samples-dev/channelsCreateSample.ts | 4 +---
.../samples-dev/channelsDeleteSample.ts | 4 +---
.../samples-dev/channelsGetSample.ts | 4 +---
.../channelsListByResourceGroupSample.ts | 4 +---
.../samples-dev/channelsListWithKeysSample.ts | 4 +---
.../samples-dev/channelsUpdateSample.ts | 4 +---
.../directLineRegenerateKeysSample.ts | 4 +---
.../samples-dev/emailCreateSignInUrlSample.ts | 4 +---
.../samples-dev/hostSettingsGetSample.ts | 4 +---
.../samples-dev/operationResultsGetSample.ts | 4 +---
.../samples-dev/operationsListSample.ts | 4 +---
.../privateEndpointConnectionsCreateSample.ts | 4 +---
.../privateEndpointConnectionsDeleteSample.ts | 4 +---
.../privateEndpointConnectionsGetSample.ts | 4 +---
.../privateEndpointConnectionsListSample.ts | 4 +---
...ateLinkResourcesListByBotResourceSample.ts | 4 +---
.../qnAMakerEndpointKeysGetSample.ts | 4 +---
.../src/botConnectionCreateSample.ts | 4 +---
.../src/botConnectionDeleteSample.ts | 4 +---
.../typescript/src/botConnectionGetSample.ts | 4 +---
.../botConnectionListByBotServiceSample.ts | 4 +---
...botConnectionListServiceProvidersSample.ts | 4 +---
.../src/botConnectionListWithSecretsSample.ts | 4 +---
.../src/botConnectionUpdateSample.ts | 4 +---
.../v4/typescript/src/botsCreateSample.ts | 4 +---
.../v4/typescript/src/botsDeleteSample.ts | 4 +---
.../src/botsGetCheckNameAvailabilitySample.ts | 4 +---
.../v4/typescript/src/botsGetSample.ts | 4 +---
.../src/botsListByResourceGroupSample.ts | 4 +---
.../v4/typescript/src/botsListSample.ts | 4 +---
.../v4/typescript/src/botsUpdateSample.ts | 4 +---
.../v4/typescript/src/channelsCreateSample.ts | 4 +---
.../v4/typescript/src/channelsDeleteSample.ts | 4 +---
.../v4/typescript/src/channelsGetSample.ts | 4 +---
.../src/channelsListByResourceGroupSample.ts | 4 +---
.../src/channelsListWithKeysSample.ts | 4 +---
.../v4/typescript/src/channelsUpdateSample.ts | 4 +---
.../src/directLineRegenerateKeysSample.ts | 4 +---
.../src/emailCreateSignInUrlSample.ts | 4 +---
.../typescript/src/hostSettingsGetSample.ts | 4 +---
.../src/operationResultsGetSample.ts | 4 +---
.../v4/typescript/src/operationsListSample.ts | 4 +---
.../privateEndpointConnectionsCreateSample.ts | 4 +---
.../privateEndpointConnectionsDeleteSample.ts | 4 +---
.../privateEndpointConnectionsGetSample.ts | 4 +---
.../privateEndpointConnectionsListSample.ts | 4 +---
...ateLinkResourcesListByBotResourceSample.ts | 4 +---
.../src/qnAMakerEndpointKeysGetSample.ts | 4 +---
.../arm-botservice/src/azureBotService.ts | 6 ++---
sdk/botservice/arm-botservice/src/index.ts | 8 +++----
.../arm-botservice/src/models/parameters.ts | 2 +-
.../src/operations/botConnection.ts | 12 +++++-----
.../arm-botservice/src/operations/bots.ts | 12 +++++-----
.../arm-botservice/src/operations/channels.ts | 12 +++++-----
.../src/operations/directLine.ts | 10 ++++-----
.../arm-botservice/src/operations/email.ts | 10 ++++-----
.../src/operations/hostSettings.ts | 10 ++++-----
.../arm-botservice/src/operations/index.ts | 22 +++++++++----------
.../src/operations/operationResults.ts | 12 +++++-----
.../src/operations/operations.ts | 12 +++++-----
.../operations/privateEndpointConnections.ts | 10 ++++-----
.../src/operations/privateLinkResources.ts | 10 ++++-----
.../src/operations/qnAMakerEndpointKeys.ts | 10 ++++-----
.../src/operationsInterfaces/botConnection.ts | 2 +-
.../src/operationsInterfaces/bots.ts | 2 +-
.../src/operationsInterfaces/channels.ts | 2 +-
.../src/operationsInterfaces/directLine.ts | 2 +-
.../src/operationsInterfaces/email.ts | 2 +-
.../src/operationsInterfaces/hostSettings.ts | 2 +-
.../src/operationsInterfaces/index.ts | 22 +++++++++----------
.../operationsInterfaces/operationResults.ts | 2 +-
.../src/operationsInterfaces/operations.ts | 2 +-
.../privateEndpointConnections.ts | 2 +-
.../privateLinkResources.ts | 2 +-
.../qnAMakerEndpointKeys.ts | 2 +-
.../test/botservice_examples.ts | 8 +++----
90 files changed, 166 insertions(+), 292 deletions(-)
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionCreateSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionCreateSample.ts
index 1aef4c8d0ef9..cdd32f134703 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConnectionSetting, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Register a new Auth Connection for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionDeleteSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionDeleteSample.ts
index 8ce9b0c0cca6..aa3f7ea73258 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionGetSample.ts
index b123d0e30e0d..20764a1d132d 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionListByBotServiceSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionListByBotServiceSample.ts
index 5e30df732450..ecdbb6056dfe 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionListByBotServiceSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionListByBotServiceSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the Connection Settings registered to a particular BotService resource
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionListServiceProvidersSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionListServiceProvidersSample.ts
index 9dfbb81eb901..cd558945987f 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionListServiceProvidersSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionListServiceProvidersSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists the available Service Providers for creating Connection Settings
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionListWithSecretsSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionListWithSecretsSample.ts
index 9a2b57463bfb..98e4daf50129 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionListWithSecretsSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionListWithSecretsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/botConnectionUpdateSample.ts b/sdk/botservice/arm-botservice/samples-dev/botConnectionUpdateSample.ts
index 2609676e2730..c6204ccbdf42 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botConnectionUpdateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botConnectionUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConnectionSetting, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsCreateSample.ts b/sdk/botservice/arm-botservice/samples-dev/botsCreateSample.ts
index b953aceb0e8a..851f24424b05 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Bot, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a Bot Service. Bot Service is a resource group wide resource type.
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsDeleteSample.ts b/sdk/botservice/arm-botservice/samples-dev/botsDeleteSample.ts
index 076ed0e94a7b..025ac7324a3d 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes a Bot Service from the resource group.
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsGetCheckNameAvailabilitySample.ts b/sdk/botservice/arm-botservice/samples-dev/botsGetCheckNameAvailabilitySample.ts
index 44af45cd4da3..3ea0e0aec3f1 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsGetCheckNameAvailabilitySample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsGetCheckNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check whether a bot name is available.
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/botsGetSample.ts
index 0613e11f753b..35f11b93a805 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns a BotService specified by the parameters.
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsListByResourceGroupSample.ts b/sdk/botservice/arm-botservice/samples-dev/botsListByResourceGroupSample.ts
index 4de9148f3984..05453dd65e7e 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsListByResourceGroupSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsListByResourceGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsListSample.ts b/sdk/botservice/arm-botservice/samples-dev/botsListSample.ts
index e47862b310aa..c7302c6f33ef 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsListSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription.
diff --git a/sdk/botservice/arm-botservice/samples-dev/botsUpdateSample.ts b/sdk/botservice/arm-botservice/samples-dev/botsUpdateSample.ts
index 1e1faf6b23a0..6d4d1a9b900b 100644
--- a/sdk/botservice/arm-botservice/samples-dev/botsUpdateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/botsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/channelsCreateSample.ts b/sdk/botservice/arm-botservice/samples-dev/channelsCreateSample.ts
index bd6f4d8194dc..8b52b2adc758 100644
--- a/sdk/botservice/arm-botservice/samples-dev/channelsCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/channelsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { BotChannel, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a Channel registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/channelsDeleteSample.ts b/sdk/botservice/arm-botservice/samples-dev/channelsDeleteSample.ts
index 0904c26680bf..a4a3081b7e3d 100644
--- a/sdk/botservice/arm-botservice/samples-dev/channelsDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/channelsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes a Channel registration from a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/channelsGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/channelsGetSample.ts
index 510aeb58e7b3..232c7eceb726 100644
--- a/sdk/botservice/arm-botservice/samples-dev/channelsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/channelsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns a BotService Channel registration specified by the parameters.
diff --git a/sdk/botservice/arm-botservice/samples-dev/channelsListByResourceGroupSample.ts b/sdk/botservice/arm-botservice/samples-dev/channelsListByResourceGroupSample.ts
index 6ec562b3ce60..e53e0e3bef20 100644
--- a/sdk/botservice/arm-botservice/samples-dev/channelsListByResourceGroupSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/channelsListByResourceGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the Channel registrations of a particular BotService resource
diff --git a/sdk/botservice/arm-botservice/samples-dev/channelsListWithKeysSample.ts b/sdk/botservice/arm-botservice/samples-dev/channelsListWithKeysSample.ts
index a151e09c6218..dfa3bd198356 100644
--- a/sdk/botservice/arm-botservice/samples-dev/channelsListWithKeysSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/channelsListWithKeysSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists a Channel registration for a Bot Service including secrets
diff --git a/sdk/botservice/arm-botservice/samples-dev/channelsUpdateSample.ts b/sdk/botservice/arm-botservice/samples-dev/channelsUpdateSample.ts
index 81b07a231020..3de56751cbff 100644
--- a/sdk/botservice/arm-botservice/samples-dev/channelsUpdateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/channelsUpdateSample.ts
@@ -17,9 +17,7 @@ import {
DirectLineSpeechChannel
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates a Channel registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/directLineRegenerateKeysSample.ts b/sdk/botservice/arm-botservice/samples-dev/directLineRegenerateKeysSample.ts
index bc4451675c1d..f4ca4f8f5fb2 100644
--- a/sdk/botservice/arm-botservice/samples-dev/directLineRegenerateKeysSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/directLineRegenerateKeysSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { SiteInfo, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource
diff --git a/sdk/botservice/arm-botservice/samples-dev/emailCreateSignInUrlSample.ts b/sdk/botservice/arm-botservice/samples-dev/emailCreateSignInUrlSample.ts
index 789e28fe9414..c2b51bd0c9a8 100644
--- a/sdk/botservice/arm-botservice/samples-dev/emailCreateSignInUrlSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/emailCreateSignInUrlSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates an email channel sign in url for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/hostSettingsGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/hostSettingsGetSample.ts
index 5c86c40b8249..6ba94f8ee005 100644
--- a/sdk/botservice/arm-botservice/samples-dev/hostSettingsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/hostSettingsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get per subscription settings needed to host bot in compute resource such as Azure App Service
diff --git a/sdk/botservice/arm-botservice/samples-dev/operationResultsGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/operationResultsGetSample.ts
index 6650423f8563..0f78e35f389a 100644
--- a/sdk/botservice/arm-botservice/samples-dev/operationResultsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/operationResultsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get the operation result for a long running operation.
diff --git a/sdk/botservice/arm-botservice/samples-dev/operationsListSample.ts b/sdk/botservice/arm-botservice/samples-dev/operationsListSample.ts
index fcb3ca8b2e49..5da50ec7fe50 100644
--- a/sdk/botservice/arm-botservice/samples-dev/operationsListSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/operationsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all the available BotService operations.
diff --git a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsCreateSample.ts b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsCreateSample.ts
index 4af4dd5d269a..03c0eb8d426c 100644
--- a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsCreateSample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsDeleteSample.ts
index cb17919c7f56..9920a9a0628f 100644
--- a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsGetSample.ts
index e2aebe96e579..35c6b9d12a95 100644
--- a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsListSample.ts
index 5ab16efbef0a..b1cb18cacffc 100644
--- a/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsListSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/privateEndpointConnectionsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to List all the private endpoint connections associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples-dev/privateLinkResourcesListByBotResourceSample.ts b/sdk/botservice/arm-botservice/samples-dev/privateLinkResourcesListByBotResourceSample.ts
index 593c7880d991..37e5cca4cbbd 100644
--- a/sdk/botservice/arm-botservice/samples-dev/privateLinkResourcesListByBotResourceSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/privateLinkResourcesListByBotResourceSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets the private link resources that need to be created for a Bot.
diff --git a/sdk/botservice/arm-botservice/samples-dev/qnAMakerEndpointKeysGetSample.ts b/sdk/botservice/arm-botservice/samples-dev/qnAMakerEndpointKeysGetSample.ts
index 3ceb37fb18c2..a80d4968cf21 100644
--- a/sdk/botservice/arm-botservice/samples-dev/qnAMakerEndpointKeysGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples-dev/qnAMakerEndpointKeysGetSample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists the QnA Maker endpoint keys
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionCreateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionCreateSample.ts
index 1aef4c8d0ef9..cdd32f134703 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConnectionSetting, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Register a new Auth Connection for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionDeleteSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionDeleteSample.ts
index 8ce9b0c0cca6..aa3f7ea73258 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionGetSample.ts
index b123d0e30e0d..20764a1d132d 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListByBotServiceSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListByBotServiceSample.ts
index 5e30df732450..ecdbb6056dfe 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListByBotServiceSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListByBotServiceSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the Connection Settings registered to a particular BotService resource
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListServiceProvidersSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListServiceProvidersSample.ts
index 9dfbb81eb901..cd558945987f 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListServiceProvidersSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListServiceProvidersSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists the available Service Providers for creating Connection Settings
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListWithSecretsSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListWithSecretsSample.ts
index 9a2b57463bfb..98e4daf50129 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListWithSecretsSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionListWithSecretsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionUpdateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionUpdateSample.ts
index 2609676e2730..c6204ccbdf42 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionUpdateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botConnectionUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ConnectionSetting, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates a Connection Setting registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsCreateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsCreateSample.ts
index b953aceb0e8a..851f24424b05 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Bot, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a Bot Service. Bot Service is a resource group wide resource type.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsDeleteSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsDeleteSample.ts
index 076ed0e94a7b..025ac7324a3d 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes a Bot Service from the resource group.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetCheckNameAvailabilitySample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetCheckNameAvailabilitySample.ts
index 44af45cd4da3..3ea0e0aec3f1 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetCheckNameAvailabilitySample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetCheckNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check whether a bot name is available.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetSample.ts
index 0613e11f753b..35f11b93a805 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns a BotService specified by the parameters.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListByResourceGroupSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListByResourceGroupSample.ts
index 4de9148f3984..05453dd65e7e 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListByResourceGroupSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListByResourceGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the resources of a particular type belonging to a resource group
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListSample.ts
index e47862b310aa..c7302c6f33ef 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the resources of a particular type belonging to a subscription.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsUpdateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsUpdateSample.ts
index 1e1faf6b23a0..6d4d1a9b900b 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsUpdateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/botsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsCreateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsCreateSample.ts
index bd6f4d8194dc..8b52b2adc758 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { BotChannel, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a Channel registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsDeleteSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsDeleteSample.ts
index 0904c26680bf..a4a3081b7e3d 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes a Channel registration from a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsGetSample.ts
index 510aeb58e7b3..232c7eceb726 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns a BotService Channel registration specified by the parameters.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListByResourceGroupSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListByResourceGroupSample.ts
index 6ec562b3ce60..e53e0e3bef20 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListByResourceGroupSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListByResourceGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Returns all the Channel registrations of a particular BotService resource
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListWithKeysSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListWithKeysSample.ts
index a151e09c6218..dfa3bd198356 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListWithKeysSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsListWithKeysSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists a Channel registration for a Bot Service including secrets
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsUpdateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsUpdateSample.ts
index 81b07a231020..3de56751cbff 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsUpdateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/channelsUpdateSample.ts
@@ -17,9 +17,7 @@ import {
DirectLineSpeechChannel
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates a Channel registration for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/directLineRegenerateKeysSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/directLineRegenerateKeysSample.ts
index bc4451675c1d..f4ca4f8f5fb2 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/directLineRegenerateKeysSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/directLineRegenerateKeysSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { SiteInfo, AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/emailCreateSignInUrlSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/emailCreateSignInUrlSample.ts
index 789e28fe9414..c2b51bd0c9a8 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/emailCreateSignInUrlSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/emailCreateSignInUrlSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates an email channel sign in url for a Bot Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/hostSettingsGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/hostSettingsGetSample.ts
index 5c86c40b8249..6ba94f8ee005 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/hostSettingsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/hostSettingsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get per subscription settings needed to host bot in compute resource such as Azure App Service
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationResultsGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationResultsGetSample.ts
index 6650423f8563..0f78e35f389a 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationResultsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationResultsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get the operation result for a long running operation.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationsListSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationsListSample.ts
index fcb3ca8b2e49..5da50ec7fe50 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationsListSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/operationsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all the available BotService operations.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsCreateSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsCreateSample.ts
index 4af4dd5d269a..03c0eb8d426c 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsCreateSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsCreateSample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Update the state of specified private endpoint connection associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts
index cb17919c7f56..9920a9a0628f 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes the specified private endpoint connection associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts
index e2aebe96e579..35c6b9d12a95 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets the specified private endpoint connection associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsListSample.ts
index 5ab16efbef0a..b1cb18cacffc 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsListSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateEndpointConnectionsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to List all the private endpoint connections associated with the Bot.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateLinkResourcesListByBotResourceSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateLinkResourcesListByBotResourceSample.ts
index 593c7880d991..37e5cca4cbbd 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateLinkResourcesListByBotResourceSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/privateLinkResourcesListByBotResourceSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AzureBotService } from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets the private link resources that need to be created for a Bot.
diff --git a/sdk/botservice/arm-botservice/samples/v4/typescript/src/qnAMakerEndpointKeysGetSample.ts b/sdk/botservice/arm-botservice/samples/v4/typescript/src/qnAMakerEndpointKeysGetSample.ts
index 3ceb37fb18c2..a80d4968cf21 100644
--- a/sdk/botservice/arm-botservice/samples/v4/typescript/src/qnAMakerEndpointKeysGetSample.ts
+++ b/sdk/botservice/arm-botservice/samples/v4/typescript/src/qnAMakerEndpointKeysGetSample.ts
@@ -13,9 +13,7 @@ import {
AzureBotService
} from "@azure/arm-botservice";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists the QnA Maker endpoint keys
diff --git a/sdk/botservice/arm-botservice/src/azureBotService.ts b/sdk/botservice/arm-botservice/src/azureBotService.ts
index 803a58f640f7..c66fe7004982 100644
--- a/sdk/botservice/arm-botservice/src/azureBotService.ts
+++ b/sdk/botservice/arm-botservice/src/azureBotService.ts
@@ -26,7 +26,7 @@ import {
OperationResultsImpl,
PrivateEndpointConnectionsImpl,
PrivateLinkResourcesImpl
-} from "./operations";
+} from "./operations/index.js";
import {
Bots,
Channels,
@@ -39,8 +39,8 @@ import {
OperationResults,
PrivateEndpointConnections,
PrivateLinkResources
-} from "./operationsInterfaces";
-import { AzureBotServiceOptionalParams } from "./models";
+} from "./operationsInterfaces/index.js";
+import { AzureBotServiceOptionalParams } from "./models/index.js";
export class AzureBotService extends coreClient.ServiceClient {
$host: string;
diff --git a/sdk/botservice/arm-botservice/src/index.ts b/sdk/botservice/arm-botservice/src/index.ts
index a439aac0b027..6542030138f6 100644
--- a/sdk/botservice/arm-botservice/src/index.ts
+++ b/sdk/botservice/arm-botservice/src/index.ts
@@ -7,7 +7,7 @@
*/
///
-export { getContinuationToken } from "./pagingHelper";
-export * from "./models";
-export { AzureBotService } from "./azureBotService";
-export * from "./operationsInterfaces";
+export { getContinuationToken } from "./pagingHelper.js";
+export * from "./models/index.js";
+export { AzureBotService } from "./azureBotService.js";
+export * from "./operationsInterfaces/index.js";
diff --git a/sdk/botservice/arm-botservice/src/models/parameters.ts b/sdk/botservice/arm-botservice/src/models/parameters.ts
index 0ef55dcd5799..7bb3cbdaff45 100644
--- a/sdk/botservice/arm-botservice/src/models/parameters.ts
+++ b/sdk/botservice/arm-botservice/src/models/parameters.ts
@@ -19,7 +19,7 @@ import {
ConnectionSetting as ConnectionSettingMapper,
QnAMakerEndpointKeysRequestBody as QnAMakerEndpointKeysRequestBodyMapper,
PrivateEndpointConnection as PrivateEndpointConnectionMapper
-} from "../models/mappers";
+} from "../models/mappers.js";
export const contentType: OperationParameter = {
parameterPath: ["options", "contentType"],
diff --git a/sdk/botservice/arm-botservice/src/operations/botConnection.ts b/sdk/botservice/arm-botservice/src/operations/botConnection.ts
index 7481b3ca1c3d..02df7b3b5b44 100644
--- a/sdk/botservice/arm-botservice/src/operations/botConnection.ts
+++ b/sdk/botservice/arm-botservice/src/operations/botConnection.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { BotConnection } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { BotConnection } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
ConnectionSetting,
BotConnectionListByBotServiceNextOptionalParams,
@@ -30,7 +30,7 @@ import {
BotConnectionGetResponse,
BotConnectionDeleteOptionalParams,
BotConnectionListByBotServiceNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing BotConnection operations. */
diff --git a/sdk/botservice/arm-botservice/src/operations/bots.ts b/sdk/botservice/arm-botservice/src/operations/bots.ts
index c6fec9952010..ff4ef0c1b22d 100644
--- a/sdk/botservice/arm-botservice/src/operations/bots.ts
+++ b/sdk/botservice/arm-botservice/src/operations/bots.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Bots } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Bots } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
Bot,
BotsListByResourceGroupNextOptionalParams,
@@ -33,7 +33,7 @@ import {
BotsGetCheckNameAvailabilityResponse,
BotsListByResourceGroupNextResponse,
BotsListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Bots operations. */
diff --git a/sdk/botservice/arm-botservice/src/operations/channels.ts b/sdk/botservice/arm-botservice/src/operations/channels.ts
index c5b5859957e4..acb425cae01c 100644
--- a/sdk/botservice/arm-botservice/src/operations/channels.ts
+++ b/sdk/botservice/arm-botservice/src/operations/channels.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Channels } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Channels } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
BotChannel,
ChannelsListByResourceGroupNextOptionalParams,
@@ -29,7 +29,7 @@ import {
ChannelsListWithKeysOptionalParams,
ChannelsListWithKeysResponse,
ChannelsListByResourceGroupNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Channels operations. */
diff --git a/sdk/botservice/arm-botservice/src/operations/directLine.ts b/sdk/botservice/arm-botservice/src/operations/directLine.ts
index e98ff62293a9..1d0afa44c46e 100644
--- a/sdk/botservice/arm-botservice/src/operations/directLine.ts
+++ b/sdk/botservice/arm-botservice/src/operations/directLine.ts
@@ -6,17 +6,17 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { DirectLine } from "../operationsInterfaces";
+import { DirectLine } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
SiteInfo,
RegenerateKeysChannelName,
DirectLineRegenerateKeysOptionalParams,
DirectLineRegenerateKeysResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing DirectLine operations. */
export class DirectLineImpl implements DirectLine {
diff --git a/sdk/botservice/arm-botservice/src/operations/email.ts b/sdk/botservice/arm-botservice/src/operations/email.ts
index 775af70bdea1..25c9f2e2798d 100644
--- a/sdk/botservice/arm-botservice/src/operations/email.ts
+++ b/sdk/botservice/arm-botservice/src/operations/email.ts
@@ -6,15 +6,15 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { Email } from "../operationsInterfaces";
+import { Email } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
EmailCreateSignInUrlOptionalParams,
EmailCreateSignInUrlResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing Email operations. */
export class EmailImpl implements Email {
diff --git a/sdk/botservice/arm-botservice/src/operations/hostSettings.ts b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts
index b57b467db071..af323174fe03 100644
--- a/sdk/botservice/arm-botservice/src/operations/hostSettings.ts
+++ b/sdk/botservice/arm-botservice/src/operations/hostSettings.ts
@@ -6,15 +6,15 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { HostSettings } from "../operationsInterfaces";
+import { HostSettings } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
HostSettingsGetOptionalParams,
HostSettingsGetResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing HostSettings operations. */
export class HostSettingsImpl implements HostSettings {
diff --git a/sdk/botservice/arm-botservice/src/operations/index.ts b/sdk/botservice/arm-botservice/src/operations/index.ts
index 641ef10fc0c5..5d5f4be4b6d4 100644
--- a/sdk/botservice/arm-botservice/src/operations/index.ts
+++ b/sdk/botservice/arm-botservice/src/operations/index.ts
@@ -6,14 +6,14 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./bots";
-export * from "./channels";
-export * from "./directLine";
-export * from "./email";
-export * from "./operations";
-export * from "./botConnection";
-export * from "./qnAMakerEndpointKeys";
-export * from "./hostSettings";
-export * from "./operationResults";
-export * from "./privateEndpointConnections";
-export * from "./privateLinkResources";
+export * from "./bots.js";
+export * from "./channels.js";
+export * from "./directLine.js";
+export * from "./email.js";
+export * from "./operations.js";
+export * from "./botConnection.js";
+export * from "./qnAMakerEndpointKeys.js";
+export * from "./hostSettings.js";
+export * from "./operationResults.js";
+export * from "./privateEndpointConnections.js";
+export * from "./privateLinkResources.js";
diff --git a/sdk/botservice/arm-botservice/src/operations/operationResults.ts b/sdk/botservice/arm-botservice/src/operations/operationResults.ts
index d9b00b262f6f..497234ccb57e 100644
--- a/sdk/botservice/arm-botservice/src/operations/operationResults.ts
+++ b/sdk/botservice/arm-botservice/src/operations/operationResults.ts
@@ -6,17 +6,17 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { OperationResults } from "../operationsInterfaces";
+import { OperationResults } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
-import { LroImpl } from "../lroImpl";
+import { LroImpl } from "../lroImpl.js";
import {
OperationResultsGetOptionalParams,
OperationResultsGetResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing OperationResults operations. */
export class OperationResultsImpl implements OperationResults {
diff --git a/sdk/botservice/arm-botservice/src/operations/operations.ts b/sdk/botservice/arm-botservice/src/operations/operations.ts
index 840dfd4fb8be..b757beecc3ce 100644
--- a/sdk/botservice/arm-botservice/src/operations/operations.ts
+++ b/sdk/botservice/arm-botservice/src/operations/operations.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Operations } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Operations } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
OperationEntity,
OperationsListNextOptionalParams,
OperationsListOptionalParams,
OperationsListResponse,
OperationsListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Operations operations. */
diff --git a/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts b/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts
index 8946c8d54e9c..96c656dd8a0f 100644
--- a/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts
+++ b/sdk/botservice/arm-botservice/src/operations/privateEndpointConnections.ts
@@ -7,11 +7,11 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { PrivateEndpointConnections } from "../operationsInterfaces";
+import { PrivateEndpointConnections } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
PrivateEndpointConnection,
PrivateEndpointConnectionsListOptionalParams,
@@ -21,7 +21,7 @@ import {
PrivateEndpointConnectionsCreateOptionalParams,
PrivateEndpointConnectionsCreateResponse,
PrivateEndpointConnectionsDeleteOptionalParams
-} from "../models";
+} from "../models/index.js";
///
/** Class containing PrivateEndpointConnections operations. */
diff --git a/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts b/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts
index 3eb53d554040..ef08264bc5f9 100644
--- a/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts
+++ b/sdk/botservice/arm-botservice/src/operations/privateLinkResources.ts
@@ -6,15 +6,15 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { PrivateLinkResources } from "../operationsInterfaces";
+import { PrivateLinkResources } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
PrivateLinkResourcesListByBotResourceOptionalParams,
PrivateLinkResourcesListByBotResourceResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing PrivateLinkResources operations. */
export class PrivateLinkResourcesImpl implements PrivateLinkResources {
diff --git a/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts b/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts
index fa358e7aade1..31978213a28e 100644
--- a/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts
+++ b/sdk/botservice/arm-botservice/src/operations/qnAMakerEndpointKeys.ts
@@ -6,16 +6,16 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { QnAMakerEndpointKeys } from "../operationsInterfaces";
+import { QnAMakerEndpointKeys } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureBotService } from "../azureBotService";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureBotService } from "../azureBotService.js";
import {
QnAMakerEndpointKeysRequestBody,
QnAMakerEndpointKeysGetOptionalParams,
QnAMakerEndpointKeysGetResponse
-} from "../models";
+} from "../models/index.js";
/** Class containing QnAMakerEndpointKeys operations. */
export class QnAMakerEndpointKeysImpl implements QnAMakerEndpointKeys {
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/botConnection.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/botConnection.ts
index ad52981d9054..aa29847cf225 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/botConnection.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/botConnection.ts
@@ -21,7 +21,7 @@ import {
BotConnectionGetOptionalParams,
BotConnectionGetResponse,
BotConnectionDeleteOptionalParams
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a BotConnection. */
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/bots.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/bots.ts
index 5be43b3143b4..a1cb30b9e472 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/bots.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/bots.ts
@@ -21,7 +21,7 @@ import {
CheckNameAvailabilityRequestBody,
BotsGetCheckNameAvailabilityOptionalParams,
BotsGetCheckNameAvailabilityResponse
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Bots. */
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/channels.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/channels.ts
index ffa3f3fcd32b..5c8452a91db8 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/channels.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/channels.ts
@@ -20,7 +20,7 @@ import {
ChannelsGetResponse,
ChannelsListWithKeysOptionalParams,
ChannelsListWithKeysResponse
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Channels. */
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/directLine.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/directLine.ts
index 5276badc2167..19f43d192cd5 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/directLine.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/directLine.ts
@@ -11,7 +11,7 @@ import {
RegenerateKeysChannelName,
DirectLineRegenerateKeysOptionalParams,
DirectLineRegenerateKeysResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a DirectLine. */
export interface DirectLine {
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts
index 65ea2d2810b9..411950835eff 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/email.ts
@@ -9,7 +9,7 @@
import {
EmailCreateSignInUrlOptionalParams,
EmailCreateSignInUrlResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a Email. */
export interface Email {
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/hostSettings.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/hostSettings.ts
index 9f1d825462da..31f1b9519e36 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/hostSettings.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/hostSettings.ts
@@ -9,7 +9,7 @@
import {
HostSettingsGetOptionalParams,
HostSettingsGetResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a HostSettings. */
export interface HostSettings {
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts
index 641ef10fc0c5..5d5f4be4b6d4 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/index.ts
@@ -6,14 +6,14 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./bots";
-export * from "./channels";
-export * from "./directLine";
-export * from "./email";
-export * from "./operations";
-export * from "./botConnection";
-export * from "./qnAMakerEndpointKeys";
-export * from "./hostSettings";
-export * from "./operationResults";
-export * from "./privateEndpointConnections";
-export * from "./privateLinkResources";
+export * from "./bots.js";
+export * from "./channels.js";
+export * from "./directLine.js";
+export * from "./email.js";
+export * from "./operations.js";
+export * from "./botConnection.js";
+export * from "./qnAMakerEndpointKeys.js";
+export * from "./hostSettings.js";
+export * from "./operationResults.js";
+export * from "./privateEndpointConnections.js";
+export * from "./privateLinkResources.js";
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/operationResults.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/operationResults.ts
index 6d6a3572d6a4..52e52c111e1b 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/operationResults.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/operationResults.ts
@@ -10,7 +10,7 @@ import { PollerLike, PollOperationState } from "@azure/core-lro";
import {
OperationResultsGetOptionalParams,
OperationResultsGetResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a OperationResults. */
export interface OperationResults {
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/operations.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/operations.ts
index 244b1dd8ced9..f5a58e206af3 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/operations.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/operations.ts
@@ -7,7 +7,7 @@
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
-import { OperationEntity, OperationsListOptionalParams } from "../models";
+import { OperationEntity, OperationsListOptionalParams } from "../models/index.js";
///
/** Interface representing a Operations. */
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/privateEndpointConnections.ts
index 929400ae4254..46dc34779999 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/privateEndpointConnections.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/privateEndpointConnections.ts
@@ -15,7 +15,7 @@ import {
PrivateEndpointConnectionsCreateOptionalParams,
PrivateEndpointConnectionsCreateResponse,
PrivateEndpointConnectionsDeleteOptionalParams
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a PrivateEndpointConnections. */
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/privateLinkResources.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/privateLinkResources.ts
index d7b72b6ed7ee..14d9e29b01b0 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/privateLinkResources.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/privateLinkResources.ts
@@ -9,7 +9,7 @@
import {
PrivateLinkResourcesListByBotResourceOptionalParams,
PrivateLinkResourcesListByBotResourceResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a PrivateLinkResources. */
export interface PrivateLinkResources {
diff --git a/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts b/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts
index 43524e71a94d..440fb6a6b93e 100644
--- a/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts
+++ b/sdk/botservice/arm-botservice/src/operationsInterfaces/qnAMakerEndpointKeys.ts
@@ -10,7 +10,7 @@ import {
QnAMakerEndpointKeysRequestBody,
QnAMakerEndpointKeysGetOptionalParams,
QnAMakerEndpointKeysGetResponse
-} from "../models";
+} from "../models/index.js";
/** Interface representing a QnAMakerEndpointKeys. */
export interface QnAMakerEndpointKeys {
diff --git a/sdk/botservice/arm-botservice/test/botservice_examples.ts b/sdk/botservice/arm-botservice/test/botservice_examples.ts
index 0aa88abcd2cf..b82b70e63008 100644
--- a/sdk/botservice/arm-botservice/test/botservice_examples.ts
+++ b/sdk/botservice/arm-botservice/test/botservice_examples.ts
@@ -10,13 +10,11 @@ import {
env,
Recorder,
RecorderStartOptions,
- delay,
isPlaybackMode,
} from "@azure-tools/test-recorder";
import { createTestCredential } from "@azure-tools/test-credential";
import { assert } from "chai";
-import { Context } from "mocha";
-import { AzureBotService } from "../src/azureBotService";
+import { AzureBotService } from "../src/azureBotService.js";
const replaceableVariables: Record = {
SUBSCRIPTION_ID: "azure_subscription_id"
@@ -42,8 +40,8 @@ describe("Botservice test", () => {
let resourceGroup: string;
let botresourceName: string;
- beforeEach(async function (this: Context) {
- recorder = new Recorder(this.currentTest);
+ beforeEach(async function (ctx) {
+ recorder = new Recorder(ctx);
await recorder.start(recorderOptions);
subscriptionId = env.SUBSCRIPTION_ID || '';
// This is an example of how the environment variables are used
From 0398eab6cb338d62ac9e99f58dde03ebc960c838 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:27 +0800
Subject: [PATCH 17/62] Migration: Apply codemod: "fixTestingImports"
---
sdk/botservice/arm-botservice/test/botservice_examples.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/botservice/arm-botservice/test/botservice_examples.ts b/sdk/botservice/arm-botservice/test/botservice_examples.ts
index b82b70e63008..8ece31c924a0 100644
--- a/sdk/botservice/arm-botservice/test/botservice_examples.ts
+++ b/sdk/botservice/arm-botservice/test/botservice_examples.ts
@@ -13,8 +13,8 @@ import {
isPlaybackMode,
} from "@azure-tools/test-recorder";
import { createTestCredential } from "@azure-tools/test-credential";
-import { assert } from "chai";
import { AzureBotService } from "../src/azureBotService.js";
+import { assert } from "vitest";
const replaceableVariables: Record = {
SUBSCRIPTION_ID: "azure_subscription_id"
From ff88204a54bc70de6361d13c68ba1df5e4b771eb Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:28 +0800
Subject: [PATCH 18/62] Migration: Apply codemod: "replaceAssertIsRejected"
From 7bf168b7cd124c6abdbb210eab1d41dfff7b4150 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:29 +0800
Subject: [PATCH 19/62] Migration: Apply codemod: "replaceSinonStub"
From e906dfe51df8e09354d367d966ffef5c49f71cf8 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:30 +0800
Subject: [PATCH 20/62] Migration: Apply codemod: "addViHelper"
From 243dc503c3c07372efce0354eb2caea57f562050 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:30 +0800
Subject: [PATCH 21/62] Migration: Apply codemod: "replaceSupportTracing"
From bdfbfa210742211ba82250e7cc77bbfe9bc42231 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:31 +0800
Subject: [PATCH 22/62] Migration: Apply codemod: "replaceTestUtils"
From d781e28b882cfad148af84e1e038810050cb8834 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:06:34 +0800
Subject: [PATCH 23/62] Migration: rushx format
From 3f307c2308d6bead7aeb890043bc181756139391 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:10:53 +0800
Subject: [PATCH 24/62] update
---
common/config/rush/pnpm-lock.yaml | 36 ++++++++++++++--------
sdk/botservice/arm-botservice/package.json | 29 ++++++++++++++---
2 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index ea7980131aaa..e166b5ee7692 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -156,7 +156,7 @@ importers:
version: file:projects/arm-billingbenefits.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-botservice':
specifier: file:./projects/arm-botservice.tgz
- version: file:projects/arm-botservice.tgz
+ version: file:projects/arm-botservice.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-cdn':
specifier: file:./projects/arm-cdn.tgz
version: file:projects/arm-cdn.tgz
@@ -2679,7 +2679,7 @@ packages:
version: 0.0.0
'@rush-temp/arm-botservice@file:projects/arm-botservice.tgz':
- resolution: {integrity: sha512-KZdspyDagf2oZR/UMozAsW5yR2oWB+9Vr+NQZSqeWfDg0S5qU94ScR5KGRCgxM43YuLCNkmN1EZTbhfFY+F/nQ==, tarball: file:projects/arm-botservice.tgz}
+ resolution: {integrity: sha512-OfTfmSGKdE9GNTaKnkrHFj7MkrpF41ubMSXR2eT6hnmY24LmVr8ynzC3gmO5US6yJruNaljoWddTWuw+0sllaQ==, tarball: file:projects/arm-botservice.tgz}
version: 0.0.0
'@rush-temp/arm-cdn@file:projects/arm-cdn.tgz':
@@ -11041,25 +11041,37 @@ snapshots:
- vite
- webdriverio
- '@rush-temp/arm-botservice@file:projects/arm-botservice.tgz':
+ '@rush-temp/arm-botservice@file:projects/arm-botservice.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))':
dependencies:
- '@azure-tools/test-credential': 1.3.1
- '@azure-tools/test-recorder': 3.5.2
'@azure/abort-controller': 1.1.0
'@azure/core-lro': 2.7.2
- '@types/chai': 4.3.20
- '@types/mocha': 10.0.10
'@types/node': 18.19.68
- chai: 4.5.0
+ '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)
+ '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8)
dotenv: 16.4.7
- mocha: 11.0.2
- ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2)
+ playwright: 1.49.1
tslib: 2.8.1
typescript: 5.7.2
+ vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))
transitivePeerDependencies:
- - '@swc/core'
- - '@swc/wasm'
+ - '@edge-runtime/vm'
+ - '@vitest/ui'
+ - bufferutil
+ - happy-dom
+ - jsdom
+ - less
+ - lightningcss
+ - msw
+ - safaridriver
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
- supports-color
+ - terser
+ - utf-8-validate
+ - vite
+ - webdriverio
'@rush-temp/arm-cdn@file:projects/arm-cdn.tgz':
dependencies:
diff --git a/sdk/botservice/arm-botservice/package.json b/sdk/botservice/arm-botservice/package.json
index 69df4e382015..7833ead6240b 100644
--- a/sdk/botservice/arm-botservice/package.json
+++ b/sdk/botservice/arm-botservice/package.json
@@ -24,9 +24,9 @@
"isomorphic"
],
"license": "MIT",
- "main": "./dist/index.js",
- "module": "./dist-esm/src/index.js",
- "types": "./types/arm-botservice.d.ts",
+ "main": "./dist/commonjs/index.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
@@ -118,5 +118,26 @@
"selfLink": false
},
"browser": "./dist/browser/index.js",
- "react-native": "./dist/react-native/index.js"
+ "react-native": "./dist/react-native/index.js",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "browser": {
+ "types": "./dist/browser/index.d.ts",
+ "default": "./dist/browser/index.js"
+ },
+ "react-native": {
+ "types": "./dist/react-native/index.d.ts",
+ "default": "./dist/react-native/index.js"
+ },
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ }
}
From 0cfd9989bfce46c2ee09a79ca75dc31abe9e7f4b Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:12:22 +0800
Subject: [PATCH 25/62] Migration: Update package.json, tsconfig.json, and
api-extractor.json
---
sdk/cdn/arm-cdn/api-extractor.json | 6 +--
sdk/cdn/arm-cdn/package.json | 61 +++++++++++++++------------
sdk/cdn/arm-cdn/tsconfig.json | 40 +++++-------------
sdk/cdn/arm-cdn/tsconfig.samples.json | 10 +++++
sdk/cdn/arm-cdn/tsconfig.src.json | 3 ++
sdk/cdn/arm-cdn/tsconfig.test.json | 6 +++
6 files changed, 67 insertions(+), 59 deletions(-)
create mode 100644 sdk/cdn/arm-cdn/tsconfig.samples.json
create mode 100644 sdk/cdn/arm-cdn/tsconfig.src.json
create mode 100644 sdk/cdn/arm-cdn/tsconfig.test.json
diff --git a/sdk/cdn/arm-cdn/api-extractor.json b/sdk/cdn/arm-cdn/api-extractor.json
index 4e06829a9405..79d4cf7e87ec 100644
--- a/sdk/cdn/arm-cdn/api-extractor.json
+++ b/sdk/cdn/arm-cdn/api-extractor.json
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
- "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
@@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
- "publicTrimmedFilePath": "./types/arm-cdn.d.ts"
+ "publicTrimmedFilePath": "dist/arm-cdn.d.ts"
},
"messages": {
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json
index d80595afe9f4..d9ece77ad6ea 100644
--- a/sdk/cdn/arm-cdn/package.json
+++ b/sdk/cdn/arm-cdn/package.json
@@ -28,18 +28,18 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-cdn.d.ts",
"devDependencies": {
- "@azure-tools/test-credential": "^1.1.0",
- "@azure-tools/test-recorder": "^3.0.0",
+ "@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.0.1",
- "@types/chai": "^4.2.8",
- "@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
- "chai": "^4.2.0",
+ "@vitest/browser": "^2.1.8",
+ "@vitest/coverage-istanbul": "^2.1.8",
"dotenv": "^16.0.0",
- "mocha": "^11.0.2",
- "ts-node": "^10.0.0",
- "typescript": "~5.7.2"
+ "playwright": "^1.49.1",
+ "typescript": "~5.7.2",
+ "vitest": "^2.1.8"
},
"repository": {
"type": "git",
@@ -49,24 +49,14 @@
"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/*"
+ "review/",
+ "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": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
@@ -78,7 +68,7 @@
"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'",
+ "integration-test:node": "dev-tool run test:vitest --esm",
"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",
@@ -87,8 +77,8 @@
"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",
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
+ "unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"sideEffects": false,
@@ -109,5 +99,24 @@
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cdn?view=azure-node-preview"
- }
+ },
+ "type": "module",
+ "tshy": {
+ "project": "./tsconfig.src.json",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ },
+ "dialects": [
+ "esm",
+ "commonjs"
+ ],
+ "esmDialects": [
+ "browser",
+ "react-native"
+ ],
+ "selfLink": false
+ },
+ "browser": "./dist/browser/index.js",
+ "react-native": "./dist/react-native/index.js"
}
diff --git a/sdk/cdn/arm-cdn/tsconfig.json b/sdk/cdn/arm-cdn/tsconfig.json
index d80de3340da5..19ceb382b521 100644
--- a/sdk/cdn/arm-cdn/tsconfig.json
+++ b/sdk/cdn/arm-cdn/tsconfig.json
@@ -1,33 +1,13 @@
{
- "compilerOptions": {
- "module": "es6",
- "moduleResolution": "node",
- "strict": true,
- "target": "es6",
- "sourceMap": true,
- "declarationMap": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "forceConsistentCasingInFileNames": true,
- "lib": [
- "es6",
- "dom"
- ],
- "declaration": true,
- "outDir": "./dist-esm",
- "importHelpers": true,
- "paths": {
- "@azure/arm-cdn": [
- "./src/index"
- ]
+ "references": [
+ {
+ "path": "./tsconfig.src.json"
+ },
+ {
+ "path": "./tsconfig.samples.json"
+ },
+ {
+ "path": "./tsconfig.test.json"
}
- },
- "include": [
- "./src/**/*.ts",
- "./test/**/*.ts",
- "samples-dev/**/*.ts"
- ],
- "exclude": [
- "node_modules"
]
-}
\ No newline at end of file
+}
diff --git a/sdk/cdn/arm-cdn/tsconfig.samples.json b/sdk/cdn/arm-cdn/tsconfig.samples.json
new file mode 100644
index 000000000000..3452fb50494e
--- /dev/null
+++ b/sdk/cdn/arm-cdn/tsconfig.samples.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.samples.base.json",
+ "compilerOptions": {
+ "paths": {
+ "@azure/arm-cdn": [
+ "./dist/esm"
+ ]
+ }
+ }
+}
diff --git a/sdk/cdn/arm-cdn/tsconfig.src.json b/sdk/cdn/arm-cdn/tsconfig.src.json
new file mode 100644
index 000000000000..bae70752dd38
--- /dev/null
+++ b/sdk/cdn/arm-cdn/tsconfig.src.json
@@ -0,0 +1,3 @@
+{
+ "extends": "../../../tsconfig.lib.json"
+}
diff --git a/sdk/cdn/arm-cdn/tsconfig.test.json b/sdk/cdn/arm-cdn/tsconfig.test.json
new file mode 100644
index 000000000000..3c2b783a8c1b
--- /dev/null
+++ b/sdk/cdn/arm-cdn/tsconfig.test.json
@@ -0,0 +1,6 @@
+{
+ "extends": [
+ "./tsconfig.src.json",
+ "../../../tsconfig.test.base.json"
+ ]
+}
From efb9520aa6766881896edc84e6a4972c65051185 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:12:22 +0800
Subject: [PATCH 26/62] Migration: Update test config
---
sdk/cdn/arm-cdn/tsconfig.browser.config.json | 17 +++++++++++++++++
sdk/cdn/arm-cdn/vitest.browser.config.ts | 17 +++++++++++++++++
sdk/cdn/arm-cdn/vitest.config.ts | 7 +++++++
sdk/cdn/arm-cdn/vitest.esm.config.ts | 12 ++++++++++++
4 files changed, 53 insertions(+)
create mode 100644 sdk/cdn/arm-cdn/tsconfig.browser.config.json
create mode 100644 sdk/cdn/arm-cdn/vitest.browser.config.ts
create mode 100644 sdk/cdn/arm-cdn/vitest.config.ts
create mode 100644 sdk/cdn/arm-cdn/vitest.esm.config.ts
diff --git a/sdk/cdn/arm-cdn/tsconfig.browser.config.json b/sdk/cdn/arm-cdn/tsconfig.browser.config.json
new file mode 100644
index 000000000000..b6586181d006
--- /dev/null
+++ b/sdk/cdn/arm-cdn/tsconfig.browser.config.json
@@ -0,0 +1,17 @@
+{
+ "extends": "./.tshy/build.json",
+ "include": [
+ "./src/**/*.ts",
+ "./src/**/*.mts",
+ "./test/**/*.spec.ts",
+ "./test/**/*.mts"
+ ],
+ "exclude": [
+ "./test/**/node/**/*.ts"
+ ],
+ "compilerOptions": {
+ "outDir": "./dist-test/browser",
+ "rootDir": ".",
+ "skipLibCheck": true
+ }
+}
diff --git a/sdk/cdn/arm-cdn/vitest.browser.config.ts b/sdk/cdn/arm-cdn/vitest.browser.config.ts
new file mode 100644
index 000000000000..b48c61b2ef46
--- /dev/null
+++ b/sdk/cdn/arm-cdn/vitest.browser.config.ts
@@ -0,0 +1,17 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { defineConfig, mergeConfig } from "vitest/config";
+import viteConfig from "../../../vitest.browser.shared.config.ts";
+
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ include: [
+ "dist-test/browser/test/**/*.spec.js",
+ ],
+ },
+ }),
+);
diff --git a/sdk/cdn/arm-cdn/vitest.config.ts b/sdk/cdn/arm-cdn/vitest.config.ts
new file mode 100644
index 000000000000..cc5cd85d4131
--- /dev/null
+++ b/sdk/cdn/arm-cdn/vitest.config.ts
@@ -0,0 +1,7 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import viteConfig from "../../../vitest.shared.config.ts";
+
+export default viteConfig;
diff --git a/sdk/cdn/arm-cdn/vitest.esm.config.ts b/sdk/cdn/arm-cdn/vitest.esm.config.ts
new file mode 100644
index 000000000000..a70127279fc9
--- /dev/null
+++ b/sdk/cdn/arm-cdn/vitest.esm.config.ts
@@ -0,0 +1,12 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { mergeConfig } from "vitest/config";
+import vitestConfig from "./vitest.config.ts";
+import vitestEsmConfig from "../../../vitest.esm.shared.config.ts";
+
+export default mergeConfig(
+ vitestConfig,
+ vitestEsmConfig
+);
From 5d8b797605c7f01395a389266f2a933496040c33 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:12:23 +0800
Subject: [PATCH 27/62] Migration: Clean up files
From cf4e9d9e3620f2241f3831e2dc8dcb71d4358b9b Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:14 +0800
Subject: [PATCH 28/62] Migration: Apply codemod: "fixSourceFile"
---
.../afdCustomDomainsCreateSample.ts | 4 +-
.../afdCustomDomainsDeleteSample.ts | 4 +-
.../samples-dev/afdCustomDomainsGetSample.ts | 4 +-
.../afdCustomDomainsListByProfileSample.ts | 4 +-
...stomDomainsRefreshValidationTokenSample.ts | 4 +-
.../afdCustomDomainsUpdateSample.ts | 4 +-
.../samples-dev/afdEndpointsCreateSample.ts | 4 +-
.../samples-dev/afdEndpointsDeleteSample.ts | 4 +-
.../samples-dev/afdEndpointsGetSample.ts | 4 +-
.../afdEndpointsListByProfileSample.ts | 4 +-
.../afdEndpointsListResourceUsageSample.ts | 4 +-
.../afdEndpointsPurgeContentSample.ts | 4 +-
.../samples-dev/afdEndpointsUpdateSample.ts | 4 +-
.../afdEndpointsValidateCustomDomainSample.ts | 4 +-
.../afdOriginGroupsCreateSample.ts | 4 +-
.../afdOriginGroupsDeleteSample.ts | 4 +-
.../samples-dev/afdOriginGroupsGetSample.ts | 4 +-
.../afdOriginGroupsListByProfileSample.ts | 4 +-
.../afdOriginGroupsListResourceUsageSample.ts | 4 +-
.../afdOriginGroupsUpdateSample.ts | 4 +-
.../samples-dev/afdOriginsCreateSample.ts | 4 +-
.../samples-dev/afdOriginsDeleteSample.ts | 4 +-
.../samples-dev/afdOriginsGetSample.ts | 4 +-
.../afdOriginsListByOriginGroupSample.ts | 4 +-
.../samples-dev/afdOriginsUpdateSample.ts | 4 +-
...ilesCheckEndpointNameAvailabilitySample.ts | 4 +-
...ProfilesCheckHostNameAvailabilitySample.ts | 4 +-
.../afdProfilesListResourceUsageSample.ts | 4 +-
.../samples-dev/afdProfilesUpgradeSample.ts | 4 +-
.../afdProfilesValidateSecretSample.ts | 4 +-
.../checkEndpointNameAvailabilitySample.ts | 4 +-
.../checkNameAvailabilitySample.ts | 4 +-
...kNameAvailabilityWithSubscriptionSample.ts | 4 +-
.../samples-dev/customDomainsCreateSample.ts | 4 +-
.../samples-dev/customDomainsDeleteSample.ts | 4 +-
.../customDomainsDisableCustomHttpsSample.ts | 4 +-
.../customDomainsEnableCustomHttpsSample.ts | 4 +-
.../samples-dev/customDomainsGetSample.ts | 4 +-
.../customDomainsListByEndpointSample.ts | 4 +-
.../samples-dev/edgeNodesListSample.ts | 4 +-
.../samples-dev/endpointsCreateSample.ts | 4 +-
.../samples-dev/endpointsDeleteSample.ts | 4 +-
.../arm-cdn/samples-dev/endpointsGetSample.ts | 4 +-
.../endpointsListByProfileSample.ts | 4 +-
.../endpointsListResourceUsageSample.ts | 4 +-
.../samples-dev/endpointsLoadContentSample.ts | 4 +-
.../endpointsPurgeContentSample.ts | 4 +-
.../samples-dev/endpointsStartSample.ts | 4 +-
.../samples-dev/endpointsStopSample.ts | 4 +-
.../samples-dev/endpointsUpdateSample.ts | 4 +-
.../endpointsValidateCustomDomainSample.ts | 4 +-
...AnalyticsGetLogAnalyticsLocationsSample.ts | 4 +-
...ogAnalyticsGetLogAnalyticsMetricsSample.ts | 4 +-
...gAnalyticsGetLogAnalyticsRankingsSample.ts | 4 +-
...AnalyticsGetLogAnalyticsResourcesSample.ts | 4 +-
...nalyticsGetWafLogAnalyticsMetricsSample.ts | 4 +-
...alyticsGetWafLogAnalyticsRankingsSample.ts | 4 +-
.../samples-dev/managedRuleSetsListSample.ts | 4 +-
.../samples-dev/operationsListSample.ts | 4 +-
.../samples-dev/originGroupsCreateSample.ts | 4 +-
.../samples-dev/originGroupsDeleteSample.ts | 4 +-
.../samples-dev/originGroupsGetSample.ts | 4 +-
.../originGroupsListByEndpointSample.ts | 4 +-
.../samples-dev/originGroupsUpdateSample.ts | 4 +-
.../samples-dev/originsCreateSample.ts | 4 +-
.../samples-dev/originsDeleteSample.ts | 4 +-
.../arm-cdn/samples-dev/originsGetSample.ts | 4 +-
.../originsListByEndpointSample.ts | 4 +-
.../samples-dev/originsUpdateSample.ts | 4 +-
.../policiesCreateOrUpdateSample.ts | 4 +-
.../samples-dev/policiesDeleteSample.ts | 4 +-
.../arm-cdn/samples-dev/policiesGetSample.ts | 4 +-
.../arm-cdn/samples-dev/policiesListSample.ts | 4 +-
.../samples-dev/policiesUpdateSample.ts | 4 +-
.../samples-dev/profilesCanMigrateSample.ts | 4 +-
.../samples-dev/profilesCreateSample.ts | 4 +-
.../samples-dev/profilesDeleteSample.ts | 4 +-
.../profilesGenerateSsoUriSample.ts | 4 +-
.../arm-cdn/samples-dev/profilesGetSample.ts | 4 +-
.../profilesListByResourceGroupSample.ts | 4 +-
.../profilesListResourceUsageSample.ts | 4 +-
.../arm-cdn/samples-dev/profilesListSample.ts | 4 +-
...lesListSupportedOptimizationTypesSample.ts | 4 +-
.../samples-dev/profilesMigrateSample.ts | 4 +-
.../profilesMigrationCommitSample.ts | 4 +-
.../samples-dev/profilesUpdateSample.ts | 4 +-
.../samples-dev/resourceUsageListSample.ts | 4 +-
.../arm-cdn/samples-dev/routesCreateSample.ts | 4 +-
.../arm-cdn/samples-dev/routesDeleteSample.ts | 4 +-
.../arm-cdn/samples-dev/routesGetSample.ts | 4 +-
.../samples-dev/routesListByEndpointSample.ts | 4 +-
.../arm-cdn/samples-dev/routesUpdateSample.ts | 4 +-
.../samples-dev/ruleSetsCreateSample.ts | 4 +-
.../samples-dev/ruleSetsDeleteSample.ts | 4 +-
.../arm-cdn/samples-dev/ruleSetsGetSample.ts | 4 +-
.../ruleSetsListByProfileSample.ts | 4 +-
.../ruleSetsListResourceUsageSample.ts | 4 +-
.../arm-cdn/samples-dev/rulesCreateSample.ts | 4 +-
.../arm-cdn/samples-dev/rulesDeleteSample.ts | 4 +-
sdk/cdn/arm-cdn/samples-dev/rulesGetSample.ts | 4 +-
.../samples-dev/rulesListByRuleSetSample.ts | 4 +-
.../arm-cdn/samples-dev/rulesUpdateSample.ts | 4 +-
.../samples-dev/secretsCreateSample.ts | 4 +-
.../samples-dev/secretsDeleteSample.ts | 4 +-
.../arm-cdn/samples-dev/secretsGetSample.ts | 4 +-
.../samples-dev/secretsListByProfileSample.ts | 4 +-
.../securityPoliciesCreateSample.ts | 4 +-
.../securityPoliciesDeleteSample.ts | 4 +-
.../samples-dev/securityPoliciesGetSample.ts | 4 +-
.../securityPoliciesListByProfileSample.ts | 4 +-
.../securityPoliciesPatchSample.ts | 4 +-
.../samples-dev/validateProbeSample.ts | 4 +-
.../src/afdCustomDomainsCreateSample.ts | 4 +-
.../src/afdCustomDomainsDeleteSample.ts | 4 +-
.../src/afdCustomDomainsGetSample.ts | 4 +-
.../afdCustomDomainsListByProfileSample.ts | 4 +-
...stomDomainsRefreshValidationTokenSample.ts | 4 +-
.../src/afdCustomDomainsUpdateSample.ts | 4 +-
.../src/afdEndpointsCreateSample.ts | 4 +-
.../src/afdEndpointsDeleteSample.ts | 4 +-
.../typescript/src/afdEndpointsGetSample.ts | 4 +-
.../src/afdEndpointsListByProfileSample.ts | 4 +-
.../afdEndpointsListResourceUsageSample.ts | 4 +-
.../src/afdEndpointsPurgeContentSample.ts | 4 +-
.../src/afdEndpointsUpdateSample.ts | 4 +-
.../afdEndpointsValidateCustomDomainSample.ts | 4 +-
.../src/afdOriginGroupsCreateSample.ts | 4 +-
.../src/afdOriginGroupsDeleteSample.ts | 4 +-
.../src/afdOriginGroupsGetSample.ts | 4 +-
.../src/afdOriginGroupsListByProfileSample.ts | 4 +-
.../afdOriginGroupsListResourceUsageSample.ts | 4 +-
.../src/afdOriginGroupsUpdateSample.ts | 4 +-
.../typescript/src/afdOriginsCreateSample.ts | 4 +-
.../typescript/src/afdOriginsDeleteSample.ts | 4 +-
.../v9/typescript/src/afdOriginsGetSample.ts | 4 +-
.../src/afdOriginsListByOriginGroupSample.ts | 4 +-
.../typescript/src/afdOriginsUpdateSample.ts | 4 +-
...ilesCheckEndpointNameAvailabilitySample.ts | 4 +-
...ProfilesCheckHostNameAvailabilitySample.ts | 4 +-
.../src/afdProfilesListResourceUsageSample.ts | 4 +-
.../src/afdProfilesUpgradeSample.ts | 4 +-
.../src/afdProfilesValidateSecretSample.ts | 4 +-
.../checkEndpointNameAvailabilitySample.ts | 4 +-
.../src/checkNameAvailabilitySample.ts | 4 +-
...kNameAvailabilityWithSubscriptionSample.ts | 4 +-
.../src/customDomainsCreateSample.ts | 4 +-
.../src/customDomainsDeleteSample.ts | 4 +-
.../customDomainsDisableCustomHttpsSample.ts | 4 +-
.../customDomainsEnableCustomHttpsSample.ts | 4 +-
.../typescript/src/customDomainsGetSample.ts | 4 +-
.../src/customDomainsListByEndpointSample.ts | 4 +-
.../v9/typescript/src/edgeNodesListSample.ts | 4 +-
.../typescript/src/endpointsCreateSample.ts | 4 +-
.../typescript/src/endpointsDeleteSample.ts | 4 +-
.../v9/typescript/src/endpointsGetSample.ts | 4 +-
.../src/endpointsListByProfileSample.ts | 4 +-
.../src/endpointsListResourceUsageSample.ts | 4 +-
.../src/endpointsLoadContentSample.ts | 4 +-
.../src/endpointsPurgeContentSample.ts | 4 +-
.../v9/typescript/src/endpointsStartSample.ts | 4 +-
.../v9/typescript/src/endpointsStopSample.ts | 4 +-
.../typescript/src/endpointsUpdateSample.ts | 4 +-
.../endpointsValidateCustomDomainSample.ts | 4 +-
...AnalyticsGetLogAnalyticsLocationsSample.ts | 4 +-
...ogAnalyticsGetLogAnalyticsMetricsSample.ts | 4 +-
...gAnalyticsGetLogAnalyticsRankingsSample.ts | 4 +-
...AnalyticsGetLogAnalyticsResourcesSample.ts | 4 +-
...nalyticsGetWafLogAnalyticsMetricsSample.ts | 4 +-
...alyticsGetWafLogAnalyticsRankingsSample.ts | 4 +-
.../src/managedRuleSetsListSample.ts | 4 +-
.../v9/typescript/src/operationsListSample.ts | 4 +-
.../src/originGroupsCreateSample.ts | 4 +-
.../src/originGroupsDeleteSample.ts | 4 +-
.../typescript/src/originGroupsGetSample.ts | 4 +-
.../src/originGroupsListByEndpointSample.ts | 4 +-
.../src/originGroupsUpdateSample.ts | 4 +-
.../v9/typescript/src/originsCreateSample.ts | 4 +-
.../v9/typescript/src/originsDeleteSample.ts | 4 +-
.../v9/typescript/src/originsGetSample.ts | 4 +-
.../src/originsListByEndpointSample.ts | 4 +-
.../v9/typescript/src/originsUpdateSample.ts | 4 +-
.../src/policiesCreateOrUpdateSample.ts | 4 +-
.../v9/typescript/src/policiesDeleteSample.ts | 4 +-
.../v9/typescript/src/policiesGetSample.ts | 4 +-
.../v9/typescript/src/policiesListSample.ts | 4 +-
.../v9/typescript/src/policiesUpdateSample.ts | 4 +-
.../src/profilesCanMigrateSample.ts | 4 +-
.../v9/typescript/src/profilesCreateSample.ts | 4 +-
.../v9/typescript/src/profilesDeleteSample.ts | 4 +-
.../src/profilesGenerateSsoUriSample.ts | 4 +-
.../v9/typescript/src/profilesGetSample.ts | 4 +-
.../src/profilesListByResourceGroupSample.ts | 4 +-
.../src/profilesListResourceUsageSample.ts | 4 +-
.../v9/typescript/src/profilesListSample.ts | 4 +-
...lesListSupportedOptimizationTypesSample.ts | 4 +-
.../typescript/src/profilesMigrateSample.ts | 4 +-
.../src/profilesMigrationCommitSample.ts | 4 +-
.../v9/typescript/src/profilesUpdateSample.ts | 4 +-
.../typescript/src/resourceUsageListSample.ts | 4 +-
.../v9/typescript/src/routesCreateSample.ts | 4 +-
.../v9/typescript/src/routesDeleteSample.ts | 4 +-
.../v9/typescript/src/routesGetSample.ts | 4 +-
.../src/routesListByEndpointSample.ts | 4 +-
.../v9/typescript/src/routesUpdateSample.ts | 4 +-
.../v9/typescript/src/ruleSetsCreateSample.ts | 4 +-
.../v9/typescript/src/ruleSetsDeleteSample.ts | 4 +-
.../v9/typescript/src/ruleSetsGetSample.ts | 4 +-
.../src/ruleSetsListByProfileSample.ts | 4 +-
.../src/ruleSetsListResourceUsageSample.ts | 4 +-
.../v9/typescript/src/rulesCreateSample.ts | 4 +-
.../v9/typescript/src/rulesDeleteSample.ts | 4 +-
.../v9/typescript/src/rulesGetSample.ts | 4 +-
.../src/rulesListByRuleSetSample.ts | 4 +-
.../v9/typescript/src/rulesUpdateSample.ts | 4 +-
.../v9/typescript/src/secretsCreateSample.ts | 4 +-
.../v9/typescript/src/secretsDeleteSample.ts | 4 +-
.../v9/typescript/src/secretsGetSample.ts | 4 +-
.../src/secretsListByProfileSample.ts | 4 +-
.../src/securityPoliciesCreateSample.ts | 4 +-
.../src/securityPoliciesDeleteSample.ts | 4 +-
.../src/securityPoliciesGetSample.ts | 4 +-
.../securityPoliciesListByProfileSample.ts | 4 +-
.../src/securityPoliciesPatchSample.ts | 4 +-
.../v9/typescript/src/validateProbeSample.ts | 4 +-
sdk/cdn/arm-cdn/src/cdnManagementClient.ts | 10 ++---
sdk/cdn/arm-cdn/src/index.ts | 8 ++--
sdk/cdn/arm-cdn/src/models/parameters.ts | 2 +-
.../src/operations/afdCustomDomains.ts | 14 +++----
.../arm-cdn/src/operations/afdEndpoints.ts | 14 +++----
.../arm-cdn/src/operations/afdOriginGroups.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/afdOrigins.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/afdProfiles.ts | 14 +++----
.../arm-cdn/src/operations/customDomains.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/edgeNodes.ts | 12 +++---
sdk/cdn/arm-cdn/src/operations/endpoints.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/index.ts | 42 +++++++++----------
.../arm-cdn/src/operations/logAnalytics.ts | 10 ++---
.../arm-cdn/src/operations/managedRuleSets.ts | 12 +++---
sdk/cdn/arm-cdn/src/operations/operations.ts | 12 +++---
.../arm-cdn/src/operations/originGroups.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/origins.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/policies.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/profiles.ts | 14 +++----
.../src/operations/resourceUsageOperations.ts | 12 +++---
sdk/cdn/arm-cdn/src/operations/routes.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/ruleSets.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/rules.ts | 14 +++----
sdk/cdn/arm-cdn/src/operations/secrets.ts | 14 +++----
.../src/operations/securityPolicies.ts | 14 +++----
.../operationsInterfaces/afdCustomDomains.ts | 2 +-
.../src/operationsInterfaces/afdEndpoints.ts | 2 +-
.../operationsInterfaces/afdOriginGroups.ts | 2 +-
.../src/operationsInterfaces/afdOrigins.ts | 2 +-
.../src/operationsInterfaces/afdProfiles.ts | 2 +-
.../src/operationsInterfaces/customDomains.ts | 2 +-
.../src/operationsInterfaces/edgeNodes.ts | 2 +-
.../src/operationsInterfaces/endpoints.ts | 2 +-
.../arm-cdn/src/operationsInterfaces/index.ts | 42 +++++++++----------
.../src/operationsInterfaces/logAnalytics.ts | 2 +-
.../operationsInterfaces/managedRuleSets.ts | 2 +-
.../src/operationsInterfaces/operations.ts | 2 +-
.../src/operationsInterfaces/originGroups.ts | 2 +-
.../src/operationsInterfaces/origins.ts | 2 +-
.../src/operationsInterfaces/policies.ts | 2 +-
.../src/operationsInterfaces/profiles.ts | 2 +-
.../resourceUsageOperations.ts | 2 +-
.../src/operationsInterfaces/routes.ts | 2 +-
.../src/operationsInterfaces/ruleSets.ts | 2 +-
.../arm-cdn/src/operationsInterfaces/rules.ts | 2 +-
.../src/operationsInterfaces/secrets.ts | 2 +-
.../operationsInterfaces/securityPolicies.ts | 2 +-
sdk/cdn/arm-cdn/test/cdn_examples.spec.ts | 11 ++---
272 files changed, 441 insertions(+), 894 deletions(-)
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsCreateSample.ts
index d3ad74815230..1e80f4bbfe01 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDDomain, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new domain within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsDeleteSample.ts
index 94c71ba88f8f..5e46e911e02f 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsGetSample.ts
index 6a8af5638019..57fe0d8cb65f 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsListByProfileSample.ts
index 8148feeb2e84..735ba3a07ce1 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor domains.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsRefreshValidationTokenSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsRefreshValidationTokenSample.ts
index 2b1703d34727..cf796a9ffe07 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsRefreshValidationTokenSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsRefreshValidationTokenSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates the domain validation token.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsUpdateSample.ts
index f63e68a4174f..4701ac70e3dc 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdCustomDomainsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDDomainUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing domain within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsCreateSample.ts
index a7bd8e53bdaf..aef872b01f14 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDEndpoint, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsDeleteSample.ts
index cffbb854c110..1d39cb45d23d 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsGetSample.ts
index 761992747113..571cae6300da 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListByProfileSample.ts
index 4c94b59cf517..c9362733b85b 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor endpoints.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListResourceUsageSample.ts
index 3f8b02f33e6d..a7d27b5cb40b 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsPurgeContentSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsPurgeContentSample.ts
index 4e626747962e..4624ed9354c6 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsPurgeContentSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsPurgeContentSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AfdPurgeParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Removes a content from AzureFrontDoor.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsUpdateSample.ts
index 3a865eed4f6f..bdb80750b597 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsValidateCustomDomainSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsValidateCustomDomainSample.ts
index ae33a8d02909..87ddfb53916c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdEndpointsValidateCustomDomainSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdEndpointsValidateCustomDomainSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateCustomDomainInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsCreateSample.ts
index 1847308363d9..cf8c4c1133d0 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDOriginGroup, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin group within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsDeleteSample.ts
index ce7e29366c97..6ee373ada02c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin group within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsGetSample.ts
index 65ea51270de0..6fc428e234a6 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin group within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListByProfileSample.ts
index 0c7fc7f1f4d7..32b9ce9fea6c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origin groups within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListResourceUsageSample.ts
index 164a8cf35ca3..04243fed1273 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile..
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsUpdateSample.ts
index 10c4a3ecb605..5150182ca9eb 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginGroupsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin group within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginsCreateSample.ts
index 2aded89a3dab..f163db60a7a6 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDOrigin, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin within the specified origin group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginsDeleteSample.ts
index d4a032ec0c36..23a8ed69ce9c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginsGetSample.ts
index dbb2e6fed434..1b193924734c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginsListByOriginGroupSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginsListByOriginGroupSample.ts
index 5d5ea6e765a6..6afdeb2dd1a0 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginsListByOriginGroupSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginsListByOriginGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origins within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdOriginsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdOriginsUpdateSample.ts
index 3ce73e0872d7..98624606d3fb 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdOriginsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdOriginsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDOriginUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckEndpointNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckEndpointNameAvailabilitySample.ts
index b1ae5756df81..a39ebea1abd0 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckEndpointNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckEndpointNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of an afdx endpoint name, and return the globally unique endpoint host name.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckHostNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckHostNameAvailabilitySample.ts
index 952b474628a4..379c92569e1d 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckHostNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdProfilesCheckHostNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdProfilesListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdProfilesListResourceUsageSample.ts
index 52db6b254e24..f01bdd6e4cb8 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdProfilesListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdProfilesListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdProfilesUpgradeSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdProfilesUpgradeSample.ts
index 10541dc3c8e3..18ed07360130 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdProfilesUpgradeSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdProfilesUpgradeSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ProfileUpgradeParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor.
diff --git a/sdk/cdn/arm-cdn/samples-dev/afdProfilesValidateSecretSample.ts b/sdk/cdn/arm-cdn/samples-dev/afdProfilesValidateSecretSample.ts
index a45eb44714ef..8d89ac3bdb9b 100644
--- a/sdk/cdn/arm-cdn/samples-dev/afdProfilesValidateSecretSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/afdProfilesValidateSecretSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateSecretInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validate a Secret in the profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/checkEndpointNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples-dev/checkEndpointNameAvailabilitySample.ts
index f52badced044..1816eb5fbea3 100644
--- a/sdk/cdn/arm-cdn/samples-dev/checkEndpointNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/checkEndpointNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilitySample.ts
index 925d2831f187..4260b02508cc 100644
--- a/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilityWithSubscriptionSample.ts b/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilityWithSubscriptionSample.ts
index 3ec3770e420a..630fe0de3838 100644
--- a/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilityWithSubscriptionSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/checkNameAvailabilityWithSubscriptionSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/customDomainsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/customDomainsCreateSample.ts
index fd038d4c235c..58c420875e54 100644
--- a/sdk/cdn/arm-cdn/samples-dev/customDomainsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/customDomainsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CustomDomainParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new custom domain within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/customDomainsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/customDomainsDeleteSample.ts
index 8e077b2e8b87..8de3b0af3be9 100644
--- a/sdk/cdn/arm-cdn/samples-dev/customDomainsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/customDomainsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing custom domain within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/customDomainsDisableCustomHttpsSample.ts b/sdk/cdn/arm-cdn/samples-dev/customDomainsDisableCustomHttpsSample.ts
index 8d6f3a83a37b..6c2d76f31ca8 100644
--- a/sdk/cdn/arm-cdn/samples-dev/customDomainsDisableCustomHttpsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/customDomainsDisableCustomHttpsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Disable https delivery of the custom domain.
diff --git a/sdk/cdn/arm-cdn/samples-dev/customDomainsEnableCustomHttpsSample.ts b/sdk/cdn/arm-cdn/samples-dev/customDomainsEnableCustomHttpsSample.ts
index e75d47a324fb..c366ccb47638 100644
--- a/sdk/cdn/arm-cdn/samples-dev/customDomainsEnableCustomHttpsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/customDomainsEnableCustomHttpsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Enable https delivery of the custom domain.
diff --git a/sdk/cdn/arm-cdn/samples-dev/customDomainsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/customDomainsGetSample.ts
index b707f14e6c10..a869acb34aea 100644
--- a/sdk/cdn/arm-cdn/samples-dev/customDomainsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/customDomainsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing custom domain within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/customDomainsListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples-dev/customDomainsListByEndpointSample.ts
index db32fb9161a1..095f17dd0c93 100644
--- a/sdk/cdn/arm-cdn/samples-dev/customDomainsListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/customDomainsListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing custom domains within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/edgeNodesListSample.ts b/sdk/cdn/arm-cdn/samples-dev/edgeNodesListSample.ts
index 9cfbe9324bb9..ab47e2c79a6d 100644
--- a/sdk/cdn/arm-cdn/samples-dev/edgeNodesListSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/edgeNodesListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsCreateSample.ts
index a72c6b09b533..ae6402ac4ea5 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Endpoint, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsDeleteSample.ts
index eb87209736a4..024381402ca5 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsGetSample.ts
index dd8328f606ed..00cca99ec6fa 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsListByProfileSample.ts
index 0402679c4584..73141e9af523 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing CDN endpoints.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsListResourceUsageSample.ts
index d52bbdb769a7..fc43870c3440 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and usage of geo filters and custom domains under the given endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsLoadContentSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsLoadContentSample.ts
index d8387b388851..5f3cf268c351 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsLoadContentSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsLoadContentSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { LoadParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Pre-loads a content to CDN. Available for Verizon Profiles.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsPurgeContentSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsPurgeContentSample.ts
index be32da1b0ebf..253bfa2bf496 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsPurgeContentSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsPurgeContentSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { PurgeParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Removes a content from CDN.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsStartSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsStartSample.ts
index 85ec30f1051c..0257b4a23636 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsStartSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsStartSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Starts an existing CDN endpoint that is on a stopped state.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsStopSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsStopSample.ts
index 36f07aa3d591..ce4a0cc63ec1 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsStopSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsStopSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Stops an existing running CDN endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsUpdateSample.ts
index 5086024199fe..8694f7df1e79 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { EndpointUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation.
diff --git a/sdk/cdn/arm-cdn/samples-dev/endpointsValidateCustomDomainSample.ts b/sdk/cdn/arm-cdn/samples-dev/endpointsValidateCustomDomainSample.ts
index 4ad298169cb8..193aa82cb79b 100644
--- a/sdk/cdn/arm-cdn/samples-dev/endpointsValidateCustomDomainSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/endpointsValidateCustomDomainSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateCustomDomainInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.
diff --git a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsLocationsSample.ts b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsLocationsSample.ts
index 6ea8783d691b..83cf49653b25 100644
--- a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsLocationsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsLocationsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get all available location names for AFD log analytics report.
diff --git a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsMetricsSample.ts b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsMetricsSample.ts
index b5ba9208e708..b05a9550c449 100644
--- a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsMetricsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsMetricsSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get log report for AFD profile
diff --git a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsRankingsSample.ts b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsRankingsSample.ts
index 0b39cc6a4a3f..488e686af7ad 100644
--- a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsRankingsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsRankingsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get log analytics ranking report for AFD profile
diff --git a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsResourcesSample.ts b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsResourcesSample.ts
index 1e1832555332..4a3aa3ebbe7c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsResourcesSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetLogAnalyticsResourcesSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get all endpoints and custom domains available for AFD log report
diff --git a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsMetricsSample.ts b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsMetricsSample.ts
index e0e5d6b22413..886af8299aae 100644
--- a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsMetricsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsMetricsSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get Waf related log analytics report for AFD profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsRankingsSample.ts b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsRankingsSample.ts
index ee1c10bcf4f9..71e684949a45 100644
--- a/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsRankingsSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/logAnalyticsGetWafLogAnalyticsRankingsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get WAF log analytics charts for AFD profile
diff --git a/sdk/cdn/arm-cdn/samples-dev/managedRuleSetsListSample.ts b/sdk/cdn/arm-cdn/samples-dev/managedRuleSetsListSample.ts
index ce25a4353a65..0fc223d14385 100644
--- a/sdk/cdn/arm-cdn/samples-dev/managedRuleSetsListSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/managedRuleSetsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all available managed rule sets.
diff --git a/sdk/cdn/arm-cdn/samples-dev/operationsListSample.ts b/sdk/cdn/arm-cdn/samples-dev/operationsListSample.ts
index 0388b429e45b..87e28f3c42b1 100644
--- a/sdk/cdn/arm-cdn/samples-dev/operationsListSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/operationsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the available CDN REST API operations.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originGroupsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/originGroupsCreateSample.ts
index e41de20a80d1..40ecc7e81814 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originGroupsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originGroupsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { OriginGroup, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin group within the specified endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originGroupsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/originGroupsDeleteSample.ts
index 6f0582a89746..ba98addbe64a 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originGroupsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originGroupsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin group within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originGroupsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/originGroupsGetSample.ts
index 5aa57b921458..0713275fc702 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originGroupsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originGroupsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin group within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originGroupsListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples-dev/originGroupsListByEndpointSample.ts
index 8e7c68bfbb8e..62c870cead16 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originGroupsListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originGroupsListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origin groups within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originGroupsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/originGroupsUpdateSample.ts
index 4232c0c1a764..cfc8a3fdc345 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originGroupsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originGroupsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin group within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/originsCreateSample.ts
index b6a623709f01..b99b490536ae 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Origin, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin within the specified endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/originsDeleteSample.ts
index 3b239a313a5e..903c5ee35068 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/originsGetSample.ts
index 265763cfc8d7..69f337fd6008 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originsListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples-dev/originsListByEndpointSample.ts
index 41087069f771..d6bdd04011ac 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originsListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originsListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origins within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/originsUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/originsUpdateSample.ts
index dbe7df3cbddc..fc7d56a9ec55 100644
--- a/sdk/cdn/arm-cdn/samples-dev/originsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/originsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { OriginUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/policiesCreateOrUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/policiesCreateOrUpdateSample.ts
index 693ef8e3e0a3..379ff7951b50 100644
--- a/sdk/cdn/arm-cdn/samples-dev/policiesCreateOrUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/policiesCreateOrUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Create or update policy with specified rule set name within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/policiesDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/policiesDeleteSample.ts
index 1af6142eb9b9..5e5666120bdc 100644
--- a/sdk/cdn/arm-cdn/samples-dev/policiesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/policiesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes Policy
diff --git a/sdk/cdn/arm-cdn/samples-dev/policiesGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/policiesGetSample.ts
index 21fd34d95a22..258fdd97507a 100644
--- a/sdk/cdn/arm-cdn/samples-dev/policiesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/policiesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Retrieve protection policy with specified name within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/policiesListSample.ts b/sdk/cdn/arm-cdn/samples-dev/policiesListSample.ts
index 2b68db9f3a3a..940d04916bd3 100644
--- a/sdk/cdn/arm-cdn/samples-dev/policiesListSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/policiesListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the protection policies within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/policiesUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/policiesUpdateSample.ts
index fea6f6b01d3b..67436d0858fb 100644
--- a/sdk/cdn/arm-cdn/samples-dev/policiesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/policiesUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesCanMigrateSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesCanMigrateSample.ts
index 367c26550ce6..bdfd00df23cc 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesCanMigrateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesCanMigrateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CanMigrateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesCreateSample.ts
index df6c34c7bd84..e8f64c943127 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Profile, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesDeleteSample.ts
index ff19ae2d9a2e..d5f9ddcbc639 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesGenerateSsoUriSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesGenerateSsoUriSample.ts
index 9fd200b99936..55d5fab0bfd1 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesGenerateSsoUriSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesGenerateSsoUriSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesGetSample.ts
index c509d97542cd..8e9d8967fa90 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesListByResourceGroupSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesListByResourceGroupSample.ts
index 33dda0616f5e..46f3fff1261f 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesListByResourceGroupSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesListByResourceGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesListResourceUsageSample.ts
index 349b92e82d57..808027ad628a 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesListSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesListSample.ts
index f509f69b8773..9d9005f54f08 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesListSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesListSupportedOptimizationTypesSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesListSupportedOptimizationTypesSample.ts
index 0c7280238362..337a9d274096 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesListSupportedOptimizationTypesSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesListSupportedOptimizationTypesSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesMigrateSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesMigrateSample.ts
index bc7fb4167ee7..9014a0253382 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesMigrateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesMigrateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MigrationParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesMigrationCommitSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesMigrationCommitSample.ts
index 61bf968ce930..18566d7cae8d 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesMigrationCommitSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesMigrationCommitSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Commit the migrated Azure Frontdoor(Standard/Premium) profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/profilesUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/profilesUpdateSample.ts
index 280320ec5cf8..4a3bbf4c15f6 100644
--- a/sdk/cdn/arm-cdn/samples-dev/profilesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/profilesUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ProfileUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group.
diff --git a/sdk/cdn/arm-cdn/samples-dev/resourceUsageListSample.ts b/sdk/cdn/arm-cdn/samples-dev/resourceUsageListSample.ts
index d42732065dff..2d9121527c65 100644
--- a/sdk/cdn/arm-cdn/samples-dev/resourceUsageListSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/resourceUsageListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the quota and actual usage of the CDN profiles under the given subscription.
diff --git a/sdk/cdn/arm-cdn/samples-dev/routesCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/routesCreateSample.ts
index c40feaaf02d9..4fd170acd34a 100644
--- a/sdk/cdn/arm-cdn/samples-dev/routesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/routesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Route, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/routesDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/routesDeleteSample.ts
index 0d57dc3d381d..f6c492c524b1 100644
--- a/sdk/cdn/arm-cdn/samples-dev/routesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/routesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/routesGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/routesGetSample.ts
index 22ca5783c238..801f5eec5a56 100644
--- a/sdk/cdn/arm-cdn/samples-dev/routesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/routesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/routesListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples-dev/routesListByEndpointSample.ts
index 54b28ace88d7..72b5d70f099a 100644
--- a/sdk/cdn/arm-cdn/samples-dev/routesListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/routesListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origins within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/routesUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/routesUpdateSample.ts
index a6cf1545c9ed..96e8c96f1691 100644
--- a/sdk/cdn/arm-cdn/samples-dev/routesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/routesUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { RouteUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples-dev/ruleSetsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/ruleSetsCreateSample.ts
index a3e83871990f..34ca0730ccf6 100644
--- a/sdk/cdn/arm-cdn/samples-dev/ruleSetsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/ruleSetsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new rule set within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/ruleSetsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/ruleSetsDeleteSample.ts
index fd1ff8624a55..8841f6089840 100644
--- a/sdk/cdn/arm-cdn/samples-dev/ruleSetsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/ruleSetsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/ruleSetsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/ruleSetsGetSample.ts
index b60b7651096c..46e9d050a115 100644
--- a/sdk/cdn/arm-cdn/samples-dev/ruleSetsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/ruleSetsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/ruleSetsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/ruleSetsListByProfileSample.ts
index a29dba3f143a..8e23cf3b5cee 100644
--- a/sdk/cdn/arm-cdn/samples-dev/ruleSetsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/ruleSetsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor rule sets within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/ruleSetsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples-dev/ruleSetsListResourceUsageSample.ts
index 2db735a0c7fd..323aa119a8f3 100644
--- a/sdk/cdn/arm-cdn/samples-dev/ruleSetsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/ruleSetsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile..
diff --git a/sdk/cdn/arm-cdn/samples-dev/rulesCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/rulesCreateSample.ts
index 915e887a790e..78add1fa98d2 100644
--- a/sdk/cdn/arm-cdn/samples-dev/rulesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/rulesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Rule, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new delivery rule within the specified rule set.
diff --git a/sdk/cdn/arm-cdn/samples-dev/rulesDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/rulesDeleteSample.ts
index 8b6014afdfc3..de34755aa8b6 100644
--- a/sdk/cdn/arm-cdn/samples-dev/rulesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/rulesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing delivery rule within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples-dev/rulesGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/rulesGetSample.ts
index 9888ad7e1058..877d1e4ac74a 100644
--- a/sdk/cdn/arm-cdn/samples-dev/rulesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/rulesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing delivery rule within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples-dev/rulesListByRuleSetSample.ts b/sdk/cdn/arm-cdn/samples-dev/rulesListByRuleSetSample.ts
index 8105033aa2c3..a10ef668f187 100644
--- a/sdk/cdn/arm-cdn/samples-dev/rulesListByRuleSetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/rulesListByRuleSetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing delivery rules within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples-dev/rulesUpdateSample.ts b/sdk/cdn/arm-cdn/samples-dev/rulesUpdateSample.ts
index 0e0b85fcd84c..d452fa0e5792 100644
--- a/sdk/cdn/arm-cdn/samples-dev/rulesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/rulesUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { RuleUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing delivery rule within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples-dev/secretsCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/secretsCreateSample.ts
index d07d40b4e60f..a7e161677c6c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/secretsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/secretsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Secret, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new Secret within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/secretsDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/secretsDeleteSample.ts
index c06553ff8b46..bdb4e2ccc0a8 100644
--- a/sdk/cdn/arm-cdn/samples-dev/secretsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/secretsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing Secret within profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/secretsGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/secretsGetSample.ts
index 11f3a466939c..ad46f75f5c32 100644
--- a/sdk/cdn/arm-cdn/samples-dev/secretsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/secretsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing Secret within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/secretsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/secretsListByProfileSample.ts
index b23a499310e0..86bd1efa9a49 100644
--- a/sdk/cdn/arm-cdn/samples-dev/secretsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/secretsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor secrets.
diff --git a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesCreateSample.ts b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesCreateSample.ts
index 20cffa2219e7..a82c68d45461 100644
--- a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { SecurityPolicy, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new security policy within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesDeleteSample.ts b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesDeleteSample.ts
index dbab4f3fbc1c..2bdf025e2c68 100644
--- a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing security policy within profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesGetSample.ts b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesGetSample.ts
index 42f7c5a03ec6..ca2aa2b68f5c 100644
--- a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing security policy within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesListByProfileSample.ts b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesListByProfileSample.ts
index cbb2ef89985a..3d6601f843c1 100644
--- a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists security policies associated with the profile
diff --git a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesPatchSample.ts b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesPatchSample.ts
index 4e2c1f955403..280b37430b50 100644
--- a/sdk/cdn/arm-cdn/samples-dev/securityPoliciesPatchSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/securityPoliciesPatchSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing security policy within a profile.
diff --git a/sdk/cdn/arm-cdn/samples-dev/validateProbeSample.ts b/sdk/cdn/arm-cdn/samples-dev/validateProbeSample.ts
index 665b8c217248..7a228249f172 100644
--- a/sdk/cdn/arm-cdn/samples-dev/validateProbeSample.ts
+++ b/sdk/cdn/arm-cdn/samples-dev/validateProbeSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateProbeInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path specified in the endpoint configuration.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsCreateSample.ts
index d3ad74815230..1e80f4bbfe01 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDDomain, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new domain within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsDeleteSample.ts
index 94c71ba88f8f..5e46e911e02f 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsGetSample.ts
index 6a8af5638019..57fe0d8cb65f 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsListByProfileSample.ts
index 8148feeb2e84..735ba3a07ce1 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor domains.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsRefreshValidationTokenSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsRefreshValidationTokenSample.ts
index 2b1703d34727..cf796a9ffe07 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsRefreshValidationTokenSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsRefreshValidationTokenSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates the domain validation token.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsUpdateSample.ts
index f63e68a4174f..4701ac70e3dc 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdCustomDomainsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDDomainUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing domain within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsCreateSample.ts
index a7bd8e53bdaf..aef872b01f14 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDEndpoint, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsDeleteSample.ts
index cffbb854c110..1d39cb45d23d 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsGetSample.ts
index 761992747113..571cae6300da 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListByProfileSample.ts
index 4c94b59cf517..c9362733b85b 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor endpoints.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListResourceUsageSample.ts
index 3f8b02f33e6d..a7d27b5cb40b 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsPurgeContentSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsPurgeContentSample.ts
index 4e626747962e..4624ed9354c6 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsPurgeContentSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsPurgeContentSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AfdPurgeParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Removes a content from AzureFrontDoor.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsUpdateSample.ts
index 3a865eed4f6f..bdb80750b597 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsValidateCustomDomainSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsValidateCustomDomainSample.ts
index ae33a8d02909..87ddfb53916c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsValidateCustomDomainSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdEndpointsValidateCustomDomainSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateCustomDomainInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsCreateSample.ts
index 1847308363d9..cf8c4c1133d0 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDOriginGroup, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin group within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsDeleteSample.ts
index ce7e29366c97..6ee373ada02c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin group within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsGetSample.ts
index 65ea51270de0..6fc428e234a6 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin group within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListByProfileSample.ts
index 0c7fc7f1f4d7..32b9ce9fea6c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origin groups within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListResourceUsageSample.ts
index 164a8cf35ca3..04243fed1273 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile..
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsUpdateSample.ts
index 10c4a3ecb605..5150182ca9eb 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginGroupsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin group within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsCreateSample.ts
index 2aded89a3dab..f163db60a7a6 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDOrigin, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin within the specified origin group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsDeleteSample.ts
index d4a032ec0c36..23a8ed69ce9c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsGetSample.ts
index dbb2e6fed434..1b193924734c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsListByOriginGroupSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsListByOriginGroupSample.ts
index 5d5ea6e765a6..6afdeb2dd1a0 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsListByOriginGroupSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsListByOriginGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origins within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsUpdateSample.ts
index 3ce73e0872d7..98624606d3fb 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdOriginsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { AFDOriginUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin within an origin group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckEndpointNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckEndpointNameAvailabilitySample.ts
index b1ae5756df81..a39ebea1abd0 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckEndpointNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckEndpointNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of an afdx endpoint name, and return the globally unique endpoint host name.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckHostNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckHostNameAvailabilitySample.ts
index 952b474628a4..379c92569e1d 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckHostNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesCheckHostNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesListResourceUsageSample.ts
index 52db6b254e24..f01bdd6e4cb8 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesUpgradeSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesUpgradeSample.ts
index 10541dc3c8e3..18ed07360130 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesUpgradeSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesUpgradeSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ProfileUpgradeParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesValidateSecretSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesValidateSecretSample.ts
index a45eb44714ef..8d89ac3bdb9b 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesValidateSecretSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/afdProfilesValidateSecretSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateSecretInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validate a Secret in the profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkEndpointNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkEndpointNameAvailabilitySample.ts
index f52badced044..1816eb5fbea3 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkEndpointNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkEndpointNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilitySample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilitySample.ts
index 925d2831f187..4260b02508cc 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilitySample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilitySample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilityWithSubscriptionSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilityWithSubscriptionSample.ts
index 3ec3770e420a..630fe0de3838 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilityWithSubscriptionSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/checkNameAvailabilityWithSubscriptionSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsCreateSample.ts
index fd038d4c235c..58c420875e54 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CustomDomainParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new custom domain within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDeleteSample.ts
index 8e077b2e8b87..8de3b0af3be9 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing custom domain within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDisableCustomHttpsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDisableCustomHttpsSample.ts
index 8d6f3a83a37b..6c2d76f31ca8 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDisableCustomHttpsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsDisableCustomHttpsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Disable https delivery of the custom domain.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsEnableCustomHttpsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsEnableCustomHttpsSample.ts
index e75d47a324fb..c366ccb47638 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsEnableCustomHttpsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsEnableCustomHttpsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Enable https delivery of the custom domain.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsGetSample.ts
index b707f14e6c10..a869acb34aea 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing custom domain within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsListByEndpointSample.ts
index db32fb9161a1..095f17dd0c93 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/customDomainsListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing custom domains within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/edgeNodesListSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/edgeNodesListSample.ts
index 9cfbe9324bb9..ab47e2c79a6d 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/edgeNodesListSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/edgeNodesListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsCreateSample.ts
index a72c6b09b533..ae6402ac4ea5 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Endpoint, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsDeleteSample.ts
index eb87209736a4..024381402ca5 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsGetSample.ts
index dd8328f606ed..00cca99ec6fa 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListByProfileSample.ts
index 0402679c4584..73141e9af523 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing CDN endpoints.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListResourceUsageSample.ts
index d52bbdb769a7..fc43870c3440 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and usage of geo filters and custom domains under the given endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsLoadContentSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsLoadContentSample.ts
index d8387b388851..5f3cf268c351 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsLoadContentSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsLoadContentSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { LoadParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Pre-loads a content to CDN. Available for Verizon Profiles.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsPurgeContentSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsPurgeContentSample.ts
index be32da1b0ebf..253bfa2bf496 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsPurgeContentSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsPurgeContentSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { PurgeParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Removes a content from CDN.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStartSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStartSample.ts
index 85ec30f1051c..0257b4a23636 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStartSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStartSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Starts an existing CDN endpoint that is on a stopped state.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStopSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStopSample.ts
index 36f07aa3d591..ce4a0cc63ec1 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStopSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsStopSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Stops an existing running CDN endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsUpdateSample.ts
index 5086024199fe..8694f7df1e79 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { EndpointUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update custom domains, use the Update Custom Domain operation.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsValidateCustomDomainSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsValidateCustomDomainSample.ts
index 4ad298169cb8..193aa82cb79b 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsValidateCustomDomainSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/endpointsValidateCustomDomainSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateCustomDomainInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsLocationsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsLocationsSample.ts
index 6ea8783d691b..83cf49653b25 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsLocationsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsLocationsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get all available location names for AFD log analytics report.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsMetricsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsMetricsSample.ts
index b5ba9208e708..b05a9550c449 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsMetricsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsMetricsSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get log report for AFD profile
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsRankingsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsRankingsSample.ts
index 0b39cc6a4a3f..488e686af7ad 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsRankingsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsRankingsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get log analytics ranking report for AFD profile
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsResourcesSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsResourcesSample.ts
index 1e1832555332..4a3aa3ebbe7c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsResourcesSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetLogAnalyticsResourcesSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get all endpoints and custom domains available for AFD log report
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsMetricsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsMetricsSample.ts
index e0e5d6b22413..886af8299aae 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsMetricsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsMetricsSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get Waf related log analytics report for AFD profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsRankingsSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsRankingsSample.ts
index ee1c10bcf4f9..71e684949a45 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsRankingsSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/logAnalyticsGetWafLogAnalyticsRankingsSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Get WAF log analytics charts for AFD profile
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/managedRuleSetsListSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/managedRuleSetsListSample.ts
index ce25a4353a65..0fc223d14385 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/managedRuleSetsListSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/managedRuleSetsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all available managed rule sets.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/operationsListSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/operationsListSample.ts
index 0388b429e45b..87e28f3c42b1 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/operationsListSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/operationsListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the available CDN REST API operations.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsCreateSample.ts
index e41de20a80d1..40ecc7e81814 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { OriginGroup, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin group within the specified endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsDeleteSample.ts
index 6f0582a89746..ba98addbe64a 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin group within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsGetSample.ts
index 5aa57b921458..0713275fc702 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin group within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsListByEndpointSample.ts
index 8e7c68bfbb8e..62c870cead16 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origin groups within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsUpdateSample.ts
index 4232c0c1a764..cfc8a3fdc345 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originGroupsUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin group within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsCreateSample.ts
index b6a623709f01..b99b490536ae 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Origin, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new origin within the specified endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsDeleteSample.ts
index 3b239a313a5e..903c5ee35068 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing origin within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsGetSample.ts
index 265763cfc8d7..69f337fd6008 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing origin within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsListByEndpointSample.ts
index 41087069f771..d6bdd04011ac 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origins within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsUpdateSample.ts
index dbe7df3cbddc..fc7d56a9ec55 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/originsUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { OriginUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing origin within an endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesCreateOrUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesCreateOrUpdateSample.ts
index 693ef8e3e0a3..379ff7951b50 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesCreateOrUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesCreateOrUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Create or update policy with specified rule set name within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesDeleteSample.ts
index 1af6142eb9b9..5e5666120bdc 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes Policy
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesGetSample.ts
index 21fd34d95a22..258fdd97507a 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Retrieve protection policy with specified name within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesListSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesListSample.ts
index 2b68db9f3a3a..940d04916bd3 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesListSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the protection policies within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesUpdateSample.ts
index fea6f6b01d3b..67436d0858fb 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/policiesUpdateSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCanMigrateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCanMigrateSample.ts
index 367c26550ce6..bdfd00df23cc 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCanMigrateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCanMigrateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CanMigrateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCreateSample.ts
index df6c34c7bd84..e8f64c943127 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Profile, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new Azure Front Door Standard or Azure Front Door Premium or CDN profile with a profile name under the specified subscription and resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesDeleteSample.ts
index ff19ae2d9a2e..d5f9ddcbc639 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGenerateSsoUriSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGenerateSsoUriSample.ts
index 9fd200b99936..55d5fab0bfd1 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGenerateSsoUriSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGenerateSsoUriSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGetSample.ts
index c509d97542cd..8e9d8967fa90 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListByResourceGroupSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListByResourceGroupSample.ts
index 33dda0616f5e..46f3fff1261f 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListByResourceGroupSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListByResourceGroupSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within a resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListResourceUsageSample.ts
index 349b92e82d57..808027ad628a 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door Standard or Azure Front Door Premium or CDN profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSample.ts
index f509f69b8773..9d9005f54f08 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the Azure Front Door Standard, Azure Front Door Premium, and CDN profiles within an Azure subscription.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSupportedOptimizationTypesSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSupportedOptimizationTypesSample.ts
index 0c7280238362..337a9d274096 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSupportedOptimizationTypesSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesListSupportedOptimizationTypesSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets the supported optimization types for the current profile. A user can create an endpoint with an optimization type from the listed values.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrateSample.ts
index bc7fb4167ee7..9014a0253382 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { MigrationParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrationCommitSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrationCommitSample.ts
index 61bf968ce930..18566d7cae8d 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrationCommitSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesMigrationCommitSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Commit the migrated Azure Frontdoor(Standard/Premium) profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesUpdateSample.ts
index 280320ec5cf8..4a3bbf4c15f6 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/profilesUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ProfileUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified profile name under the specified subscription and resource group.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/resourceUsageListSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/resourceUsageListSample.ts
index d42732065dff..2d9121527c65 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/resourceUsageListSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/resourceUsageListSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check the quota and actual usage of the CDN profiles under the given subscription.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesCreateSample.ts
index c40feaaf02d9..4fd170acd34a 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Route, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesDeleteSample.ts
index 0d57dc3d381d..f6c492c524b1 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesGetSample.ts
index 22ca5783c238..801f5eec5a56 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesListByEndpointSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesListByEndpointSample.ts
index 54b28ace88d7..72b5d70f099a 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesListByEndpointSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesListByEndpointSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing origins within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesUpdateSample.ts
index a6cf1545c9ed..96e8c96f1691 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/routesUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { RouteUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsCreateSample.ts
index a3e83871990f..34ca0730ccf6 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new rule set within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsDeleteSample.ts
index fd1ff8624a55..8841f6089840 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsGetSample.ts
index b60b7651096c..46e9d050a115 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListByProfileSample.ts
index a29dba3f143a..8e23cf3b5cee 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor rule sets within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListResourceUsageSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListResourceUsageSample.ts
index 2db735a0c7fd..323aa119a8f3 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListResourceUsageSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/ruleSetsListResourceUsageSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Checks the quota and actual usage of endpoints under the given Azure Front Door profile..
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesCreateSample.ts
index 915e887a790e..78add1fa98d2 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Rule, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new delivery rule within the specified rule set.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesDeleteSample.ts
index 8b6014afdfc3..de34755aa8b6 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing delivery rule within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesGetSample.ts
index 9888ad7e1058..877d1e4ac74a 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing delivery rule within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesListByRuleSetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesListByRuleSetSample.ts
index 8105033aa2c3..a10ef668f187 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesListByRuleSetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesListByRuleSetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists all of the existing delivery rules within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesUpdateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesUpdateSample.ts
index 0e0b85fcd84c..d452fa0e5792 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesUpdateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/rulesUpdateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { RuleUpdateParameters, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing delivery rule within a rule set.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsCreateSample.ts
index d07d40b4e60f..a7e161677c6c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { Secret, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new Secret within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsDeleteSample.ts
index c06553ff8b46..bdb4e2ccc0a8 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing Secret within profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsGetSample.ts
index 11f3a466939c..ad46f75f5c32 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing Secret within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsListByProfileSample.ts
index b23a499310e0..86bd1efa9a49 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/secretsListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists existing AzureFrontDoor secrets.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesCreateSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesCreateSample.ts
index 20cffa2219e7..a82c68d45461 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesCreateSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesCreateSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { SecurityPolicy, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Creates a new security policy within the specified profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesDeleteSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesDeleteSample.ts
index dbab4f3fbc1c..2bdf025e2c68 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesDeleteSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesDeleteSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Deletes an existing security policy within profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesGetSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesGetSample.ts
index 42f7c5a03ec6..ca2aa2b68f5c 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesGetSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesGetSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Gets an existing security policy within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesListByProfileSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesListByProfileSample.ts
index cbb2ef89985a..3d6601f843c1 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesListByProfileSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesListByProfileSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Lists security policies associated with the profile
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesPatchSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesPatchSample.ts
index 4e2c1f955403..280b37430b50 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesPatchSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/securityPoliciesPatchSample.ts
@@ -13,9 +13,7 @@ import {
CdnManagementClient,
} from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Updates an existing security policy within a profile.
diff --git a/sdk/cdn/arm-cdn/samples/v9/typescript/src/validateProbeSample.ts b/sdk/cdn/arm-cdn/samples/v9/typescript/src/validateProbeSample.ts
index 665b8c217248..7a228249f172 100644
--- a/sdk/cdn/arm-cdn/samples/v9/typescript/src/validateProbeSample.ts
+++ b/sdk/cdn/arm-cdn/samples/v9/typescript/src/validateProbeSample.ts
@@ -10,9 +10,7 @@
// Licensed under the MIT License.
import { ValidateProbeInput, CdnManagementClient } from "@azure/arm-cdn";
import { DefaultAzureCredential } from "@azure/identity";
-import * as dotenv from "dotenv";
-
-dotenv.config();
+import "dotenv/config";
/**
* This sample demonstrates how to Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is relative to the origin path specified in the endpoint configuration.
diff --git a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts
index 27d163782235..ad3be13a5643 100644
--- a/sdk/cdn/arm-cdn/src/cdnManagementClient.ts
+++ b/sdk/cdn/arm-cdn/src/cdnManagementClient.ts
@@ -36,7 +36,7 @@ import {
EdgeNodesImpl,
PoliciesImpl,
ManagedRuleSetsImpl,
-} from "./operations";
+} from "./operations/index.js";
import {
AfdProfiles,
AfdCustomDomains,
@@ -59,9 +59,9 @@ import {
EdgeNodes,
Policies,
ManagedRuleSets,
-} from "./operationsInterfaces";
-import * as Parameters from "./models/parameters";
-import * as Mappers from "./models/mappers";
+} from "./operationsInterfaces/index.js";
+import * as Parameters from "./models/parameters.js";
+import * as Mappers from "./models/mappers.js";
import {
CdnManagementClientOptionalParams,
CheckEndpointNameAvailabilityInput,
@@ -75,7 +75,7 @@ import {
ValidateProbeInput,
ValidateProbeOptionalParams,
ValidateProbeResponse,
-} from "./models";
+} from "./models/index.js";
export class CdnManagementClient extends coreClient.ServiceClient {
$host: string;
diff --git a/sdk/cdn/arm-cdn/src/index.ts b/sdk/cdn/arm-cdn/src/index.ts
index c92b874e13b3..eda45f3b3fec 100644
--- a/sdk/cdn/arm-cdn/src/index.ts
+++ b/sdk/cdn/arm-cdn/src/index.ts
@@ -7,7 +7,7 @@
*/
///
-export { getContinuationToken } from "./pagingHelper";
-export * from "./models";
-export { CdnManagementClient } from "./cdnManagementClient";
-export * from "./operationsInterfaces";
+export { getContinuationToken } from "./pagingHelper.js";
+export * from "./models/index.js";
+export { CdnManagementClient } from "./cdnManagementClient.js";
+export * from "./operationsInterfaces/index.js";
diff --git a/sdk/cdn/arm-cdn/src/models/parameters.ts b/sdk/cdn/arm-cdn/src/models/parameters.ts
index 275a4adc8803..a5db4c7f53f2 100644
--- a/sdk/cdn/arm-cdn/src/models/parameters.ts
+++ b/sdk/cdn/arm-cdn/src/models/parameters.ts
@@ -51,7 +51,7 @@ import {
CustomDomainHttpsParameters as CustomDomainHttpsParametersMapper,
CdnWebApplicationFirewallPolicy as CdnWebApplicationFirewallPolicyMapper,
CdnWebApplicationFirewallPolicyPatchParameters as CdnWebApplicationFirewallPolicyPatchParametersMapper,
-} from "../models/mappers";
+} from "../models/mappers.js";
export const contentType: OperationParameter = {
parameterPath: ["options", "contentType"],
diff --git a/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts b/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts
index 0754000391f4..fdd007e94689 100644
--- a/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts
+++ b/sdk/cdn/arm-cdn/src/operations/afdCustomDomains.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { AfdCustomDomains } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { AfdCustomDomains } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
AFDDomain,
AfdCustomDomainsListByProfileNextOptionalParams,
@@ -34,7 +34,7 @@ import {
AfdCustomDomainsDeleteOptionalParams,
AfdCustomDomainsRefreshValidationTokenOptionalParams,
AfdCustomDomainsListByProfileNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing AfdCustomDomains operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts b/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts
index 3d2060050aed..11f9e205ba9a 100644
--- a/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts
+++ b/sdk/cdn/arm-cdn/src/operations/afdEndpoints.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { AfdEndpoints } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { AfdEndpoints } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
AFDEndpoint,
AfdEndpointsListByProfileNextOptionalParams,
@@ -43,7 +43,7 @@ import {
AfdEndpointsValidateCustomDomainResponse,
AfdEndpointsListByProfileNextResponse,
AfdEndpointsListResourceUsageNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing AfdEndpoints operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts b/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts
index b518cc5bad99..5de6e664d948 100644
--- a/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts
+++ b/sdk/cdn/arm-cdn/src/operations/afdOriginGroups.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { AfdOriginGroups } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { AfdOriginGroups } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
AFDOriginGroup,
AfdOriginGroupsListByProfileNextOptionalParams,
@@ -38,7 +38,7 @@ import {
AfdOriginGroupsDeleteOptionalParams,
AfdOriginGroupsListByProfileNextResponse,
AfdOriginGroupsListResourceUsageNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing AfdOriginGroups operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts b/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts
index 65a703d9b8de..8f23ce210327 100644
--- a/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts
+++ b/sdk/cdn/arm-cdn/src/operations/afdOrigins.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { AfdOrigins } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { AfdOrigins } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
AFDOrigin,
AfdOriginsListByOriginGroupNextOptionalParams,
@@ -33,7 +33,7 @@ import {
AfdOriginsUpdateResponse,
AfdOriginsDeleteOptionalParams,
AfdOriginsListByOriginGroupNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing AfdOrigins operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts b/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts
index 6948bc6013db..ac1c8c497e33 100644
--- a/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts
+++ b/sdk/cdn/arm-cdn/src/operations/afdProfiles.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { AfdProfiles } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { AfdProfiles } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Usage,
AfdProfilesListResourceUsageNextOptionalParams,
@@ -37,7 +37,7 @@ import {
AfdProfilesUpgradeOptionalParams,
AfdProfilesUpgradeResponse,
AfdProfilesListResourceUsageNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing AfdProfiles operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/customDomains.ts b/sdk/cdn/arm-cdn/src/operations/customDomains.ts
index db4b88ad0fc9..9d06337fa3ac 100644
--- a/sdk/cdn/arm-cdn/src/operations/customDomains.ts
+++ b/sdk/cdn/arm-cdn/src/operations/customDomains.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { CustomDomains } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { CustomDomains } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
CustomDomain,
CustomDomainsListByEndpointNextOptionalParams,
@@ -35,7 +35,7 @@ import {
CustomDomainsEnableCustomHttpsOptionalParams,
CustomDomainsEnableCustomHttpsResponse,
CustomDomainsListByEndpointNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing CustomDomains operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts b/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts
index 3347ba1a0eed..6da935c1985d 100644
--- a/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts
+++ b/sdk/cdn/arm-cdn/src/operations/edgeNodes.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { EdgeNodes } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { EdgeNodes } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
EdgeNode,
EdgeNodesListNextOptionalParams,
EdgeNodesListOptionalParams,
EdgeNodesListResponse,
EdgeNodesListNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing EdgeNodes operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/endpoints.ts b/sdk/cdn/arm-cdn/src/operations/endpoints.ts
index 3358edd0cd69..e9c6a9be11ba 100644
--- a/sdk/cdn/arm-cdn/src/operations/endpoints.ts
+++ b/sdk/cdn/arm-cdn/src/operations/endpoints.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Endpoints } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Endpoints } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Endpoint,
EndpointsListByProfileNextOptionalParams,
@@ -49,7 +49,7 @@ import {
EndpointsValidateCustomDomainResponse,
EndpointsListByProfileNextResponse,
EndpointsListResourceUsageNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Endpoints operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/index.ts b/sdk/cdn/arm-cdn/src/operations/index.ts
index 9f55e9bfc3bf..adb4076f988c 100644
--- a/sdk/cdn/arm-cdn/src/operations/index.ts
+++ b/sdk/cdn/arm-cdn/src/operations/index.ts
@@ -6,24 +6,24 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./afdProfiles";
-export * from "./afdCustomDomains";
-export * from "./afdEndpoints";
-export * from "./afdOriginGroups";
-export * from "./afdOrigins";
-export * from "./routes";
-export * from "./ruleSets";
-export * from "./rules";
-export * from "./securityPolicies";
-export * from "./secrets";
-export * from "./logAnalytics";
-export * from "./profiles";
-export * from "./endpoints";
-export * from "./origins";
-export * from "./originGroups";
-export * from "./customDomains";
-export * from "./resourceUsageOperations";
-export * from "./operations";
-export * from "./edgeNodes";
-export * from "./policies";
-export * from "./managedRuleSets";
+export * from "./afdProfiles.js";
+export * from "./afdCustomDomains.js";
+export * from "./afdEndpoints.js";
+export * from "./afdOriginGroups.js";
+export * from "./afdOrigins.js";
+export * from "./routes.js";
+export * from "./ruleSets.js";
+export * from "./rules.js";
+export * from "./securityPolicies.js";
+export * from "./secrets.js";
+export * from "./logAnalytics.js";
+export * from "./profiles.js";
+export * from "./endpoints.js";
+export * from "./origins.js";
+export * from "./originGroups.js";
+export * from "./customDomains.js";
+export * from "./resourceUsageOperations.js";
+export * from "./operations.js";
+export * from "./edgeNodes.js";
+export * from "./policies.js";
+export * from "./managedRuleSets.js";
diff --git a/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts b/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts
index 3a1721481b0c..6d3f10af1c71 100644
--- a/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts
+++ b/sdk/cdn/arm-cdn/src/operations/logAnalytics.ts
@@ -6,11 +6,11 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-import { LogAnalytics } from "../operationsInterfaces";
+import { LogAnalytics } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
LogMetric,
LogMetricsGranularity,
@@ -31,7 +31,7 @@ import {
WafRankingType,
LogAnalyticsGetWafLogAnalyticsRankingsOptionalParams,
LogAnalyticsGetWafLogAnalyticsRankingsResponse,
-} from "../models";
+} from "../models/index.js";
/** Class containing LogAnalytics operations. */
export class LogAnalyticsImpl implements LogAnalytics {
diff --git a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts
index 4e6d2e662de9..aef119ec9dcb 100644
--- a/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts
+++ b/sdk/cdn/arm-cdn/src/operations/managedRuleSets.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { ManagedRuleSets } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { ManagedRuleSets } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
ManagedRuleSetDefinition,
ManagedRuleSetsListNextOptionalParams,
ManagedRuleSetsListOptionalParams,
ManagedRuleSetsListResponse,
ManagedRuleSetsListNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing ManagedRuleSets operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/operations.ts b/sdk/cdn/arm-cdn/src/operations/operations.ts
index 752f13e5ae1b..65485a0e9538 100644
--- a/sdk/cdn/arm-cdn/src/operations/operations.ts
+++ b/sdk/cdn/arm-cdn/src/operations/operations.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Operations } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Operations } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
Operation,
OperationsListNextOptionalParams,
OperationsListOptionalParams,
OperationsListResponse,
OperationsListNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Operations operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/originGroups.ts b/sdk/cdn/arm-cdn/src/operations/originGroups.ts
index a20b87684683..c799ede4b6d0 100644
--- a/sdk/cdn/arm-cdn/src/operations/originGroups.ts
+++ b/sdk/cdn/arm-cdn/src/operations/originGroups.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { OriginGroups } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { OriginGroups } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
OriginGroup,
OriginGroupsListByEndpointNextOptionalParams,
@@ -33,7 +33,7 @@ import {
OriginGroupsUpdateResponse,
OriginGroupsDeleteOptionalParams,
OriginGroupsListByEndpointNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing OriginGroups operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/origins.ts b/sdk/cdn/arm-cdn/src/operations/origins.ts
index 50e23870bb1d..13c81ff0c9dc 100644
--- a/sdk/cdn/arm-cdn/src/operations/origins.ts
+++ b/sdk/cdn/arm-cdn/src/operations/origins.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Origins } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Origins } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Origin,
OriginsListByEndpointNextOptionalParams,
@@ -33,7 +33,7 @@ import {
OriginsUpdateResponse,
OriginsDeleteOptionalParams,
OriginsListByEndpointNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Origins operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/policies.ts b/sdk/cdn/arm-cdn/src/operations/policies.ts
index 5a5146a87ed0..c1b74b164e8c 100644
--- a/sdk/cdn/arm-cdn/src/operations/policies.ts
+++ b/sdk/cdn/arm-cdn/src/operations/policies.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Policies } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Policies } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
CdnWebApplicationFirewallPolicy,
PoliciesListNextOptionalParams,
@@ -33,7 +33,7 @@ import {
PoliciesUpdateResponse,
PoliciesDeleteOptionalParams,
PoliciesListNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Policies operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/profiles.ts b/sdk/cdn/arm-cdn/src/operations/profiles.ts
index ed7afcc2dac4..a1a2fa5660a2 100644
--- a/sdk/cdn/arm-cdn/src/operations/profiles.ts
+++ b/sdk/cdn/arm-cdn/src/operations/profiles.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Profiles } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Profiles } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Profile,
ProfilesListNextOptionalParams,
@@ -53,7 +53,7 @@ import {
ProfilesListNextResponse,
ProfilesListByResourceGroupNextResponse,
ProfilesListResourceUsageNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Profiles operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts b/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts
index 974d232492cb..020bce169ff2 100644
--- a/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts
+++ b/sdk/cdn/arm-cdn/src/operations/resourceUsageOperations.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { ResourceUsageOperations } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { ResourceUsageOperations } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
ResourceUsage,
ResourceUsageListNextOptionalParams,
ResourceUsageListOptionalParams,
ResourceUsageListResponse,
ResourceUsageListNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing ResourceUsageOperations operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/routes.ts b/sdk/cdn/arm-cdn/src/operations/routes.ts
index 66db74e3a33e..0ca0697bfc46 100644
--- a/sdk/cdn/arm-cdn/src/operations/routes.ts
+++ b/sdk/cdn/arm-cdn/src/operations/routes.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Routes } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Routes } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Route,
RoutesListByEndpointNextOptionalParams,
@@ -33,7 +33,7 @@ import {
RoutesUpdateResponse,
RoutesDeleteOptionalParams,
RoutesListByEndpointNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Routes operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/ruleSets.ts b/sdk/cdn/arm-cdn/src/operations/ruleSets.ts
index 3a75cc909f65..9d41db068361 100644
--- a/sdk/cdn/arm-cdn/src/operations/ruleSets.ts
+++ b/sdk/cdn/arm-cdn/src/operations/ruleSets.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { RuleSets } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { RuleSets } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
RuleSet,
RuleSetsListByProfileNextOptionalParams,
@@ -35,7 +35,7 @@ import {
RuleSetsDeleteOptionalParams,
RuleSetsListByProfileNextResponse,
RuleSetsListResourceUsageNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing RuleSets operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/rules.ts b/sdk/cdn/arm-cdn/src/operations/rules.ts
index 5b211199aa37..cb0e26304785 100644
--- a/sdk/cdn/arm-cdn/src/operations/rules.ts
+++ b/sdk/cdn/arm-cdn/src/operations/rules.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Rules } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Rules } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Rule,
RulesListByRuleSetNextOptionalParams,
@@ -33,7 +33,7 @@ import {
RulesUpdateResponse,
RulesDeleteOptionalParams,
RulesListByRuleSetNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Rules operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/secrets.ts b/sdk/cdn/arm-cdn/src/operations/secrets.ts
index fe414acd1b0b..b37d886dd6bd 100644
--- a/sdk/cdn/arm-cdn/src/operations/secrets.ts
+++ b/sdk/cdn/arm-cdn/src/operations/secrets.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Secrets } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Secrets } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
Secret,
SecretsListByProfileNextOptionalParams,
@@ -30,7 +30,7 @@ import {
SecretsCreateResponse,
SecretsDeleteOptionalParams,
SecretsListByProfileNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Secrets operations. */
diff --git a/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts b/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts
index dc109d36cc83..3f83b99487cf 100644
--- a/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts
+++ b/sdk/cdn/arm-cdn/src/operations/securityPolicies.ts
@@ -7,18 +7,18 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { SecurityPolicies } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { SecurityPolicies } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { CdnManagementClient } from "../cdnManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { CdnManagementClient } from "../cdnManagementClient.js";
import {
SimplePollerLike,
OperationState,
createHttpPoller,
} from "@azure/core-lro";
-import { createLroSpec } from "../lroImpl";
+import { createLroSpec } from "../lroImpl.js";
import {
SecurityPolicy,
SecurityPoliciesListByProfileNextOptionalParams,
@@ -33,7 +33,7 @@ import {
SecurityPoliciesPatchResponse,
SecurityPoliciesDeleteOptionalParams,
SecurityPoliciesListByProfileNextResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Class containing SecurityPolicies operations. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts
index baeb7c0d0ffb..918b16437970 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdCustomDomains.ts
@@ -20,7 +20,7 @@ import {
AfdCustomDomainsUpdateResponse,
AfdCustomDomainsDeleteOptionalParams,
AfdCustomDomainsRefreshValidationTokenOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a AfdCustomDomains. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts
index b95e736f727e..38b5f5b8b5d1 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdEndpoints.ts
@@ -26,7 +26,7 @@ import {
ValidateCustomDomainInput,
AfdEndpointsValidateCustomDomainOptionalParams,
AfdEndpointsValidateCustomDomainResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a AfdEndpoints. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts
index 2eaa28e6da43..8453284d5a03 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOriginGroups.ts
@@ -21,7 +21,7 @@ import {
AfdOriginGroupsUpdateOptionalParams,
AfdOriginGroupsUpdateResponse,
AfdOriginGroupsDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a AfdOriginGroups. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts
index 10736af9e93a..8e8541079fab 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdOrigins.ts
@@ -19,7 +19,7 @@ import {
AfdOriginsUpdateOptionalParams,
AfdOriginsUpdateResponse,
AfdOriginsDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a AfdOrigins. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts
index 31dfb99e0664..747ddd5c38a7 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/afdProfiles.ts
@@ -23,7 +23,7 @@ import {
ProfileUpgradeParameters,
AfdProfilesUpgradeOptionalParams,
AfdProfilesUpgradeResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a AfdProfiles. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts
index 3904a206fae9..b36dfb673cbb 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/customDomains.ts
@@ -21,7 +21,7 @@ import {
CustomDomainsDisableCustomHttpsResponse,
CustomDomainsEnableCustomHttpsOptionalParams,
CustomDomainsEnableCustomHttpsResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a CustomDomains. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/edgeNodes.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/edgeNodes.ts
index 3c5fe48641bd..bd80e3206d31 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/edgeNodes.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/edgeNodes.ts
@@ -7,7 +7,7 @@
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
-import { EdgeNode, EdgeNodesListOptionalParams } from "../models";
+import { EdgeNode, EdgeNodesListOptionalParams } from "../models/index.js";
///
/** Interface representing a EdgeNodes. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts
index 2aba58593744..2994df34d6ef 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/endpoints.ts
@@ -32,7 +32,7 @@ import {
ValidateCustomDomainInput,
EndpointsValidateCustomDomainOptionalParams,
EndpointsValidateCustomDomainResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Endpoints. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts
index 9f55e9bfc3bf..adb4076f988c 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/index.ts
@@ -6,24 +6,24 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./afdProfiles";
-export * from "./afdCustomDomains";
-export * from "./afdEndpoints";
-export * from "./afdOriginGroups";
-export * from "./afdOrigins";
-export * from "./routes";
-export * from "./ruleSets";
-export * from "./rules";
-export * from "./securityPolicies";
-export * from "./secrets";
-export * from "./logAnalytics";
-export * from "./profiles";
-export * from "./endpoints";
-export * from "./origins";
-export * from "./originGroups";
-export * from "./customDomains";
-export * from "./resourceUsageOperations";
-export * from "./operations";
-export * from "./edgeNodes";
-export * from "./policies";
-export * from "./managedRuleSets";
+export * from "./afdProfiles.js";
+export * from "./afdCustomDomains.js";
+export * from "./afdEndpoints.js";
+export * from "./afdOriginGroups.js";
+export * from "./afdOrigins.js";
+export * from "./routes.js";
+export * from "./ruleSets.js";
+export * from "./rules.js";
+export * from "./securityPolicies.js";
+export * from "./secrets.js";
+export * from "./logAnalytics.js";
+export * from "./profiles.js";
+export * from "./endpoints.js";
+export * from "./origins.js";
+export * from "./originGroups.js";
+export * from "./customDomains.js";
+export * from "./resourceUsageOperations.js";
+export * from "./operations.js";
+export * from "./edgeNodes.js";
+export * from "./policies.js";
+export * from "./managedRuleSets.js";
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/logAnalytics.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/logAnalytics.ts
index d292df641b71..725ef64185b5 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/logAnalytics.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/logAnalytics.ts
@@ -26,7 +26,7 @@ import {
WafRankingType,
LogAnalyticsGetWafLogAnalyticsRankingsOptionalParams,
LogAnalyticsGetWafLogAnalyticsRankingsResponse,
-} from "../models";
+} from "../models/index.js";
/** Interface representing a LogAnalytics. */
export interface LogAnalytics {
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/managedRuleSets.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/managedRuleSets.ts
index 1decde3bd6fd..1a09e2c77acf 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/managedRuleSets.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/managedRuleSets.ts
@@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
ManagedRuleSetDefinition,
ManagedRuleSetsListOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a ManagedRuleSets. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/operations.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/operations.ts
index 89b10db4c645..6a832551b81d 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/operations.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/operations.ts
@@ -7,7 +7,7 @@
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
-import { Operation, OperationsListOptionalParams } from "../models";
+import { Operation, OperationsListOptionalParams } from "../models/index.js";
///
/** Interface representing a Operations. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts
index 1b00407be665..0168c8c96238 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/originGroups.ts
@@ -19,7 +19,7 @@ import {
OriginGroupsUpdateOptionalParams,
OriginGroupsUpdateResponse,
OriginGroupsDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a OriginGroups. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts
index 7970a740ffdf..ee29d129620b 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/origins.ts
@@ -19,7 +19,7 @@ import {
OriginsUpdateOptionalParams,
OriginsUpdateResponse,
OriginsDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Origins. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts
index 60598048e723..a06b0642680a 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/policies.ts
@@ -19,7 +19,7 @@ import {
PoliciesUpdateOptionalParams,
PoliciesUpdateResponse,
PoliciesDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Policies. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts
index 90b96814c110..27d2c8fa1c92 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/profiles.ts
@@ -33,7 +33,7 @@ import {
ProfilesGenerateSsoUriResponse,
ProfilesListSupportedOptimizationTypesOptionalParams,
ProfilesListSupportedOptimizationTypesResponse,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Profiles. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/resourceUsageOperations.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/resourceUsageOperations.ts
index 467b169e308b..c43a74d20b35 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/resourceUsageOperations.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/resourceUsageOperations.ts
@@ -7,7 +7,7 @@
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
-import { ResourceUsage, ResourceUsageListOptionalParams } from "../models";
+import { ResourceUsage, ResourceUsageListOptionalParams } from "../models/index.js";
///
/** Interface representing a ResourceUsageOperations. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts
index bb55f174e14f..c0b90f6fedf1 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/routes.ts
@@ -19,7 +19,7 @@ import {
RoutesUpdateOptionalParams,
RoutesUpdateResponse,
RoutesDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Routes. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts
index 7860d6c912f2..e5e7beff5390 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/ruleSets.ts
@@ -18,7 +18,7 @@ import {
RuleSetsCreateOptionalParams,
RuleSetsCreateResponse,
RuleSetsDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a RuleSets. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts
index 35cf866aa9a1..01d70cc4dc61 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/rules.ts
@@ -19,7 +19,7 @@ import {
RulesUpdateOptionalParams,
RulesUpdateResponse,
RulesDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Rules. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts
index cc7227fac1f4..166d6b3796f6 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/secrets.ts
@@ -16,7 +16,7 @@ import {
SecretsCreateOptionalParams,
SecretsCreateResponse,
SecretsDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Secrets. */
diff --git a/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts b/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts
index cbde00ba9df2..3690e1f5ba17 100644
--- a/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts
+++ b/sdk/cdn/arm-cdn/src/operationsInterfaces/securityPolicies.ts
@@ -19,7 +19,7 @@ import {
SecurityPoliciesPatchOptionalParams,
SecurityPoliciesPatchResponse,
SecurityPoliciesDeleteOptionalParams,
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a SecurityPolicies. */
diff --git a/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts b/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts
index 3ec962842400..e30cc78e02bd 100644
--- a/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts
+++ b/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts
@@ -10,13 +10,11 @@ import {
env,
Recorder,
RecorderStartOptions,
- delay,
isPlaybackMode,
} from "@azure-tools/test-recorder";
import { createTestCredential } from "@azure-tools/test-credential";
import { assert } from "chai";
-import { Context } from "mocha";
-import { CdnManagementClient } from "../src/cdnManagementClient";
+import { CdnManagementClient } from "../src/cdnManagementClient.js";
const replaceableVariables: Record = {
SUBSCRIPTION_ID: "azure_subscription_id"
@@ -43,8 +41,8 @@ describe("CDN test", () => {
let profileName: string;
let endpointName: string;
- beforeEach(async function (this: Context) {
- recorder = new Recorder(this.currentTest);
+ beforeEach(async function (ctx) {
+ recorder = new Recorder(ctx);
await recorder.start(recorderOptions);
subscriptionId = env.SUBSCRIPTION_ID || '';
// This is an example of how the environment variables are used
@@ -123,7 +121,6 @@ describe("CDN test", () => {
});
it("profiles update test", async function () {
- const res = await client.profiles.beginUpdateAndWait(resourceGroup, profileName, { tags: { additional_properties: "Tag1" } }, testPollingOptions);
});
it("endpoints list test", async function () {
@@ -154,7 +151,6 @@ describe("CDN test", () => {
});
it("endpoints delete test", async function () {
- const res = await client.endpoints.beginDeleteAndWait(resourceGroup, profileName, endpointName, testPollingOptions);
const resArray = new Array();
for await (let item of client.endpoints.listByProfile(resourceGroup, profileName)) {
resArray.push(item);
@@ -163,7 +159,6 @@ describe("CDN test", () => {
});
it("profiles delete test", async function () {
- const res = await client.profiles.beginDeleteAndWait(resourceGroup, profileName, testPollingOptions);
const resArray = new Array();
for await (let item of client.profiles.listByResourceGroup(resourceGroup)) {
resArray.push(item);
From 35eb88dd6f4a3751069ea1590a4d4a11a96e087f Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:16 +0800
Subject: [PATCH 29/62] Migration: Apply codemod: "fixTestingImports"
---
sdk/cdn/arm-cdn/test/cdn_examples.spec.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts b/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts
index e30cc78e02bd..f51c8b53c821 100644
--- a/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts
+++ b/sdk/cdn/arm-cdn/test/cdn_examples.spec.ts
@@ -13,8 +13,8 @@ import {
isPlaybackMode,
} from "@azure-tools/test-recorder";
import { createTestCredential } from "@azure-tools/test-credential";
-import { assert } from "chai";
import { CdnManagementClient } from "../src/cdnManagementClient.js";
+import { describe, it, assert, beforeEach, afterEach } from "vitest";
const replaceableVariables: Record = {
SUBSCRIPTION_ID: "azure_subscription_id"
From 62cf420a4d09ce1e463bbecd061e871776629ead Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:18 +0800
Subject: [PATCH 30/62] Migration: Apply codemod: "replaceAssertIsRejected"
From 5031f925f3b781e16637f17b2fb56caded92ccba Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:20 +0800
Subject: [PATCH 31/62] Migration: Apply codemod: "replaceSinonStub"
From 17b38be5d536b429fed23ba791c0947476bb2a38 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:22 +0800
Subject: [PATCH 32/62] Migration: Apply codemod: "addViHelper"
From 9cdc1db0b4da722d1fd58c94fc6d84cd4122e7e3 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:23 +0800
Subject: [PATCH 33/62] Migration: Apply codemod: "replaceSupportTracing"
From a0e18ade216fabb4b5ca2bf68387be994192232f Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:25 +0800
Subject: [PATCH 34/62] Migration: Apply codemod: "replaceTestUtils"
From 02d916988922fa736785dd36fec7ad581d2dc1e6 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:13:27 +0800
Subject: [PATCH 35/62] Migration: rushx format
From 2d96d1fac6a09849a81ff529f8a26081901ed835 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:17:00 +0800
Subject: [PATCH 36/62] update
---
common/config/rush/pnpm-lock.yaml | 36 ++++++++++++++++++++-----------
sdk/cdn/arm-cdn/package.json | 29 +++++++++++++++++++++----
2 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index e166b5ee7692..f38509003ff2 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -159,7 +159,7 @@ importers:
version: file:projects/arm-botservice.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-cdn':
specifier: file:./projects/arm-cdn.tgz
- version: file:projects/arm-cdn.tgz
+ version: file:projects/arm-cdn.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-changeanalysis':
specifier: file:./projects/arm-changeanalysis.tgz
version: file:projects/arm-changeanalysis.tgz
@@ -2683,7 +2683,7 @@ packages:
version: 0.0.0
'@rush-temp/arm-cdn@file:projects/arm-cdn.tgz':
- resolution: {integrity: sha512-eN+tz/69n7nF04fPaWtBiQ87ys1Wt1T/RnpoyDRtsikeXHBsbNzCCTowWvdjv8KhRt7P7jdo3FqWXUAkv/nP6A==, tarball: file:projects/arm-cdn.tgz}
+ resolution: {integrity: sha512-uYLsL4OGbNmkZ8gptZpip7cHYhm0IUEwz7tbiTHv8w7k5WCU0i03aB9mdgYD3dbR3BYjA7bAHjibcwcDR2/7CQ==, tarball: file:projects/arm-cdn.tgz}
version: 0.0.0
'@rush-temp/arm-changeanalysis@file:projects/arm-changeanalysis.tgz':
@@ -11073,25 +11073,37 @@ snapshots:
- vite
- webdriverio
- '@rush-temp/arm-cdn@file:projects/arm-cdn.tgz':
+ '@rush-temp/arm-cdn@file:projects/arm-cdn.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))':
dependencies:
- '@azure-tools/test-credential': 1.3.1
- '@azure-tools/test-recorder': 3.5.2
'@azure/abort-controller': 1.1.0
'@azure/core-lro': 2.7.2
- '@types/chai': 4.3.20
- '@types/mocha': 10.0.10
'@types/node': 18.19.68
- chai: 4.5.0
+ '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)
+ '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8)
dotenv: 16.4.7
- mocha: 11.0.2
- ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2)
+ playwright: 1.49.1
tslib: 2.8.1
typescript: 5.7.2
+ vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))
transitivePeerDependencies:
- - '@swc/core'
- - '@swc/wasm'
+ - '@edge-runtime/vm'
+ - '@vitest/ui'
+ - bufferutil
+ - happy-dom
+ - jsdom
+ - less
+ - lightningcss
+ - msw
+ - safaridriver
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
- supports-color
+ - terser
+ - utf-8-validate
+ - vite
+ - webdriverio
'@rush-temp/arm-changeanalysis@file:projects/arm-changeanalysis.tgz':
dependencies:
diff --git a/sdk/cdn/arm-cdn/package.json b/sdk/cdn/arm-cdn/package.json
index d9ece77ad6ea..07f1212fa418 100644
--- a/sdk/cdn/arm-cdn/package.json
+++ b/sdk/cdn/arm-cdn/package.json
@@ -24,9 +24,9 @@
"isomorphic"
],
"license": "MIT",
- "main": "./dist/index.js",
- "module": "./dist-esm/src/index.js",
- "types": "./types/arm-cdn.d.ts",
+ "main": "./dist/commonjs/index.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
@@ -118,5 +118,26 @@
"selfLink": false
},
"browser": "./dist/browser/index.js",
- "react-native": "./dist/react-native/index.js"
+ "react-native": "./dist/react-native/index.js",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "browser": {
+ "types": "./dist/browser/index.d.ts",
+ "default": "./dist/browser/index.js"
+ },
+ "react-native": {
+ "types": "./dist/react-native/index.d.ts",
+ "default": "./dist/react-native/index.js"
+ },
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ }
}
From 68bb6594697f08d73ac35717b4bc5f9f83edcdf5 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:28 +0800
Subject: [PATCH 37/62] Migration: Update package.json, tsconfig.json, and
api-extractor.json
---
.../arm-changeanalysis/api-extractor.json | 6 +-
.../arm-changeanalysis/package.json | 61 +++++++++++--------
.../arm-changeanalysis/tsconfig.json | 40 +++---------
.../arm-changeanalysis/tsconfig.samples.json | 10 +++
.../arm-changeanalysis/tsconfig.src.json | 3 +
.../arm-changeanalysis/tsconfig.test.json | 6 ++
6 files changed, 67 insertions(+), 59 deletions(-)
create mode 100644 sdk/changeanalysis/arm-changeanalysis/tsconfig.samples.json
create mode 100644 sdk/changeanalysis/arm-changeanalysis/tsconfig.src.json
create mode 100644 sdk/changeanalysis/arm-changeanalysis/tsconfig.test.json
diff --git a/sdk/changeanalysis/arm-changeanalysis/api-extractor.json b/sdk/changeanalysis/arm-changeanalysis/api-extractor.json
index c2ed3e77c1a8..d4a628e667b5 100644
--- a/sdk/changeanalysis/arm-changeanalysis/api-extractor.json
+++ b/sdk/changeanalysis/arm-changeanalysis/api-extractor.json
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
- "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
@@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
- "publicTrimmedFilePath": "./types/arm-changeanalysis.d.ts"
+ "publicTrimmedFilePath": "dist/arm-changeanalysis.d.ts"
},
"messages": {
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/sdk/changeanalysis/arm-changeanalysis/package.json b/sdk/changeanalysis/arm-changeanalysis/package.json
index f970abcf8cfa..51ac38ed136d 100644
--- a/sdk/changeanalysis/arm-changeanalysis/package.json
+++ b/sdk/changeanalysis/arm-changeanalysis/package.json
@@ -26,17 +26,17 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-changeanalysis.d.ts",
"devDependencies": {
- "@azure-tools/test-credential": "^1.0.0",
- "@azure-tools/test-recorder": "^3.0.0",
+ "@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.0.1",
- "@types/chai": "^4.2.8",
- "@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
- "chai": "^4.2.0",
- "mocha": "^11.0.2",
- "ts-node": "^10.0.0",
- "typescript": "~5.7.2"
+ "@vitest/browser": "^2.1.8",
+ "@vitest/coverage-istanbul": "^2.1.8",
+ "playwright": "^1.49.1",
+ "typescript": "~5.7.2",
+ "vitest": "^2.1.8"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changeanalysis/arm-changeanalysis",
"repository": {
@@ -47,24 +47,14 @@
"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/*"
+ "review/",
+ "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": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
@@ -76,7 +66,7 @@
"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'",
+ "integration-test:node": "dev-tool run test:vitest --esm",
"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",
@@ -85,8 +75,8 @@
"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",
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
+ "unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"sideEffects": false,
@@ -106,5 +96,24 @@
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-changeanalysis?view=azure-node-preview"
- }
+ },
+ "type": "module",
+ "tshy": {
+ "project": "./tsconfig.src.json",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ },
+ "dialects": [
+ "esm",
+ "commonjs"
+ ],
+ "esmDialects": [
+ "browser",
+ "react-native"
+ ],
+ "selfLink": false
+ },
+ "browser": "./dist/browser/index.js",
+ "react-native": "./dist/react-native/index.js"
}
diff --git a/sdk/changeanalysis/arm-changeanalysis/tsconfig.json b/sdk/changeanalysis/arm-changeanalysis/tsconfig.json
index 2fae11a7cfd8..19ceb382b521 100644
--- a/sdk/changeanalysis/arm-changeanalysis/tsconfig.json
+++ b/sdk/changeanalysis/arm-changeanalysis/tsconfig.json
@@ -1,33 +1,13 @@
{
- "compilerOptions": {
- "module": "es6",
- "moduleResolution": "node",
- "strict": true,
- "target": "es6",
- "sourceMap": true,
- "declarationMap": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "forceConsistentCasingInFileNames": true,
- "lib": [
- "es6",
- "dom"
- ],
- "declaration": true,
- "outDir": "./dist-esm",
- "importHelpers": true,
- "paths": {
- "@azure/arm-changeanalysis": [
- "./src/index"
- ]
+ "references": [
+ {
+ "path": "./tsconfig.src.json"
+ },
+ {
+ "path": "./tsconfig.samples.json"
+ },
+ {
+ "path": "./tsconfig.test.json"
}
- },
- "include": [
- "./src/**/*.ts",
- "./test/**/*.ts",
- "samples-dev/**/*.ts"
- ],
- "exclude": [
- "node_modules"
]
-}
\ No newline at end of file
+}
diff --git a/sdk/changeanalysis/arm-changeanalysis/tsconfig.samples.json b/sdk/changeanalysis/arm-changeanalysis/tsconfig.samples.json
new file mode 100644
index 000000000000..85d6e75fabde
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/tsconfig.samples.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.samples.base.json",
+ "compilerOptions": {
+ "paths": {
+ "@azure/arm-changeanalysis": [
+ "./dist/esm"
+ ]
+ }
+ }
+}
diff --git a/sdk/changeanalysis/arm-changeanalysis/tsconfig.src.json b/sdk/changeanalysis/arm-changeanalysis/tsconfig.src.json
new file mode 100644
index 000000000000..bae70752dd38
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/tsconfig.src.json
@@ -0,0 +1,3 @@
+{
+ "extends": "../../../tsconfig.lib.json"
+}
diff --git a/sdk/changeanalysis/arm-changeanalysis/tsconfig.test.json b/sdk/changeanalysis/arm-changeanalysis/tsconfig.test.json
new file mode 100644
index 000000000000..3c2b783a8c1b
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/tsconfig.test.json
@@ -0,0 +1,6 @@
+{
+ "extends": [
+ "./tsconfig.src.json",
+ "../../../tsconfig.test.base.json"
+ ]
+}
From 5fbd0751c2c633cccbfb4a1fc22e1b9eaf607bee Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:28 +0800
Subject: [PATCH 38/62] Migration: Update test config
---
.../tsconfig.browser.config.json | 17 +++++++++++++++++
.../arm-changeanalysis/vitest.browser.config.ts | 17 +++++++++++++++++
.../arm-changeanalysis/vitest.config.ts | 7 +++++++
.../arm-changeanalysis/vitest.esm.config.ts | 12 ++++++++++++
4 files changed, 53 insertions(+)
create mode 100644 sdk/changeanalysis/arm-changeanalysis/tsconfig.browser.config.json
create mode 100644 sdk/changeanalysis/arm-changeanalysis/vitest.browser.config.ts
create mode 100644 sdk/changeanalysis/arm-changeanalysis/vitest.config.ts
create mode 100644 sdk/changeanalysis/arm-changeanalysis/vitest.esm.config.ts
diff --git a/sdk/changeanalysis/arm-changeanalysis/tsconfig.browser.config.json b/sdk/changeanalysis/arm-changeanalysis/tsconfig.browser.config.json
new file mode 100644
index 000000000000..b6586181d006
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/tsconfig.browser.config.json
@@ -0,0 +1,17 @@
+{
+ "extends": "./.tshy/build.json",
+ "include": [
+ "./src/**/*.ts",
+ "./src/**/*.mts",
+ "./test/**/*.spec.ts",
+ "./test/**/*.mts"
+ ],
+ "exclude": [
+ "./test/**/node/**/*.ts"
+ ],
+ "compilerOptions": {
+ "outDir": "./dist-test/browser",
+ "rootDir": ".",
+ "skipLibCheck": true
+ }
+}
diff --git a/sdk/changeanalysis/arm-changeanalysis/vitest.browser.config.ts b/sdk/changeanalysis/arm-changeanalysis/vitest.browser.config.ts
new file mode 100644
index 000000000000..b48c61b2ef46
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/vitest.browser.config.ts
@@ -0,0 +1,17 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { defineConfig, mergeConfig } from "vitest/config";
+import viteConfig from "../../../vitest.browser.shared.config.ts";
+
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ include: [
+ "dist-test/browser/test/**/*.spec.js",
+ ],
+ },
+ }),
+);
diff --git a/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts b/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts
new file mode 100644
index 000000000000..cc5cd85d4131
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts
@@ -0,0 +1,7 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import viteConfig from "../../../vitest.shared.config.ts";
+
+export default viteConfig;
diff --git a/sdk/changeanalysis/arm-changeanalysis/vitest.esm.config.ts b/sdk/changeanalysis/arm-changeanalysis/vitest.esm.config.ts
new file mode 100644
index 000000000000..a70127279fc9
--- /dev/null
+++ b/sdk/changeanalysis/arm-changeanalysis/vitest.esm.config.ts
@@ -0,0 +1,12 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { mergeConfig } from "vitest/config";
+import vitestConfig from "./vitest.config.ts";
+import vitestEsmConfig from "../../../vitest.esm.shared.config.ts";
+
+export default mergeConfig(
+ vitestConfig,
+ vitestEsmConfig
+);
From 92fe64a6d5606676cd319c3f5e798266dc17471f Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:29 +0800
Subject: [PATCH 39/62] Migration: Clean up files
From 0c2b5c78f27c524fc8cf4e5f84e5f5e1c4a8fecb Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:37 +0800
Subject: [PATCH 40/62] Migration: Apply codemod: "fixSourceFile"
---
.../src/azureChangeAnalysisManagementClient.ts | 6 +++---
sdk/changeanalysis/arm-changeanalysis/src/index.ts | 8 ++++----
.../arm-changeanalysis/src/operations/changes.ts | 12 ++++++------
.../arm-changeanalysis/src/operations/index.ts | 6 +++---
.../arm-changeanalysis/src/operations/operations.ts | 12 ++++++------
.../src/operations/resourceChanges.ts | 12 ++++++------
.../src/operationsInterfaces/changes.ts | 2 +-
.../src/operationsInterfaces/index.ts | 6 +++---
.../src/operationsInterfaces/operations.ts | 2 +-
.../src/operationsInterfaces/resourceChanges.ts | 2 +-
.../arm-changeanalysis/test/sampleTest.ts | 10 +++-------
11 files changed, 37 insertions(+), 41 deletions(-)
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/azureChangeAnalysisManagementClient.ts b/sdk/changeanalysis/arm-changeanalysis/src/azureChangeAnalysisManagementClient.ts
index 2e878c443df7..d5409342da21 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/azureChangeAnalysisManagementClient.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/azureChangeAnalysisManagementClient.ts
@@ -14,9 +14,9 @@ import {
SendRequest
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
-import { OperationsImpl, ResourceChangesImpl, ChangesImpl } from "./operations";
-import { Operations, ResourceChanges, Changes } from "./operationsInterfaces";
-import { AzureChangeAnalysisManagementClientOptionalParams } from "./models";
+import { OperationsImpl, ResourceChangesImpl, ChangesImpl } from "./operations/index.js";
+import { Operations, ResourceChanges, Changes } from "./operationsInterfaces/index.js";
+import { AzureChangeAnalysisManagementClientOptionalParams } from "./models/index.js";
export class AzureChangeAnalysisManagementClient extends coreClient.ServiceClient {
$host: string;
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/index.ts b/sdk/changeanalysis/arm-changeanalysis/src/index.ts
index 0568f76bf271..081f2a9a9f15 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/index.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/index.ts
@@ -7,7 +7,7 @@
*/
///
-export { getContinuationToken } from "./pagingHelper";
-export * from "./models";
-export { AzureChangeAnalysisManagementClient } from "./azureChangeAnalysisManagementClient";
-export * from "./operationsInterfaces";
+export { getContinuationToken } from "./pagingHelper.js";
+export * from "./models/index.js";
+export { AzureChangeAnalysisManagementClient } from "./azureChangeAnalysisManagementClient.js";
+export * from "./operationsInterfaces/index.js";
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operations/changes.ts b/sdk/changeanalysis/arm-changeanalysis/src/operations/changes.ts
index fb30a01702d9..d88f4c248220 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operations/changes.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operations/changes.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Changes } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Changes } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureChangeAnalysisManagementClient } from "../azureChangeAnalysisManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureChangeAnalysisManagementClient } from "../azureChangeAnalysisManagementClient.js";
import {
Change,
ChangesListChangesByResourceGroupNextOptionalParams,
@@ -23,7 +23,7 @@ import {
ChangesListChangesBySubscriptionResponse,
ChangesListChangesByResourceGroupNextResponse,
ChangesListChangesBySubscriptionNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Changes operations. */
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operations/index.ts b/sdk/changeanalysis/arm-changeanalysis/src/operations/index.ts
index 4e5555b816a4..c549dbbc838f 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operations/index.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operations/index.ts
@@ -6,6 +6,6 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./operations";
-export * from "./resourceChanges";
-export * from "./changes";
+export * from "./operations.js";
+export * from "./resourceChanges.js";
+export * from "./changes.js";
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operations/operations.ts b/sdk/changeanalysis/arm-changeanalysis/src/operations/operations.ts
index ad373959e8d9..f8de446c908d 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operations/operations.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operations/operations.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Operations } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Operations } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureChangeAnalysisManagementClient } from "../azureChangeAnalysisManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureChangeAnalysisManagementClient } from "../azureChangeAnalysisManagementClient.js";
import {
ResourceProviderOperationDefinition,
OperationsListNextOptionalParams,
OperationsListOptionalParams,
OperationsListResponse,
OperationsListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Operations operations. */
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operations/resourceChanges.ts b/sdk/changeanalysis/arm-changeanalysis/src/operations/resourceChanges.ts
index 6f2b2948f9cb..e20e490f195e 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operations/resourceChanges.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operations/resourceChanges.ts
@@ -7,19 +7,19 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { ResourceChanges } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { ResourceChanges } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { AzureChangeAnalysisManagementClient } from "../azureChangeAnalysisManagementClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { AzureChangeAnalysisManagementClient } from "../azureChangeAnalysisManagementClient.js";
import {
Change,
ResourceChangesListNextOptionalParams,
ResourceChangesListOptionalParams,
ResourceChangesListResponse,
ResourceChangesListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing ResourceChanges operations. */
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/changes.ts b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/changes.ts
index b3ce21048972..8730c248e529 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/changes.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/changes.ts
@@ -11,7 +11,7 @@ import {
Change,
ChangesListChangesByResourceGroupOptionalParams,
ChangesListChangesBySubscriptionOptionalParams
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Changes. */
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/index.ts b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/index.ts
index 4e5555b816a4..c549dbbc838f 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/index.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/index.ts
@@ -6,6 +6,6 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./operations";
-export * from "./resourceChanges";
-export * from "./changes";
+export * from "./operations.js";
+export * from "./resourceChanges.js";
+export * from "./changes.js";
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/operations.ts b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/operations.ts
index 7d21c8f6c2cc..609fe7314440 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/operations.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/operations.ts
@@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
ResourceProviderOperationDefinition,
OperationsListOptionalParams
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Operations. */
diff --git a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/resourceChanges.ts b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/resourceChanges.ts
index 150b9c3be1da..55d1395c31b9 100644
--- a/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/resourceChanges.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/src/operationsInterfaces/resourceChanges.ts
@@ -7,7 +7,7 @@
*/
import { PagedAsyncIterableIterator } from "@azure/core-paging";
-import { Change, ResourceChangesListOptionalParams } from "../models";
+import { Change, ResourceChangesListOptionalParams } from "../models/index.js";
///
/** Interface representing a ResourceChanges. */
diff --git a/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts b/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts
index 8ff7deb0acbe..f0d6ea6885e4 100644
--- a/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts
@@ -8,11 +8,7 @@
import {
Recorder,
- RecorderStartOptions,
- env
-} from "@azure-tools/test-recorder";
-import { assert } from "chai";
-import { Context } from "mocha";
+ RecorderStartOptions} from "@azure-tools/test-recorder";
const replaceableVariables: Record = {
AZURE_CLIENT_ID: "azure_client_id",
@@ -32,8 +28,8 @@ const recorderOptions: RecorderStartOptions = {
describe("My test", () => {
let recorder: Recorder;
- beforeEach(async function (this: Context) {
- recorder = new Recorder(this.currentTest);
+ beforeEach(async function (ctx) {
+ recorder = new Recorder(ctx);
await recorder.start(recorderOptions);
});
From fa4c5c40238414aa1733a30b0a99429467de5043 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:38 +0800
Subject: [PATCH 41/62] Migration: Apply codemod: "fixTestingImports"
From 0ab15efe402992648364997bfe5e357dccc84d0a Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:39 +0800
Subject: [PATCH 42/62] Migration: Apply codemod: "replaceAssertIsRejected"
From bce66c7378fc74fc0dd360b9d521e5ff1f7240b2 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:39 +0800
Subject: [PATCH 43/62] Migration: Apply codemod: "replaceSinonStub"
From d58cce13cbd925a36494e3dd2e8eb2c192b4a200 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:40 +0800
Subject: [PATCH 44/62] Migration: Apply codemod: "addViHelper"
From 6be6a5902e1586beca5482a24734cbd2dab8ef18 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:40 +0800
Subject: [PATCH 45/62] Migration: Apply codemod: "replaceSupportTracing"
From 80c7f2934c4f739bd805115ce700effe1b1b8a4c Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:41 +0800
Subject: [PATCH 46/62] Migration: Apply codemod: "replaceTestUtils"
From dd214e2dadeaea6466a72fd93185ccee3e764118 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:18:43 +0800
Subject: [PATCH 47/62] Migration: rushx format
From 6a94cce076769c69c4958fef8000c16fe4410239 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:24:26 +0800
Subject: [PATCH 48/62] update
---
common/config/rush/pnpm-lock.yaml | 36 ++++++++++++-------
.../arm-changeanalysis/package.json | 29 ++++++++++++---
2 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index f38509003ff2..bc574a939fc2 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -162,7 +162,7 @@ importers:
version: file:projects/arm-cdn.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-changeanalysis':
specifier: file:./projects/arm-changeanalysis.tgz
- version: file:projects/arm-changeanalysis.tgz
+ version: file:projects/arm-changeanalysis.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-changes':
specifier: file:./projects/arm-changes.tgz
version: file:projects/arm-changes.tgz
@@ -2687,7 +2687,7 @@ packages:
version: 0.0.0
'@rush-temp/arm-changeanalysis@file:projects/arm-changeanalysis.tgz':
- resolution: {integrity: sha512-aOFGOt2rADHCR+Y3vkfZi1QszXOhfFXeDNZZnON6J87LR/RpgCoVbWyBLz+R1bryjzv/lNsMPPkneJ+SFbR45Q==, tarball: file:projects/arm-changeanalysis.tgz}
+ resolution: {integrity: sha512-4oWhoBAAkIpxOxrwXffeKx8rBOgH+Sqb8sh7oEZ77r2sJNGP0X1xzjtLZYz96ErqEJRwO+ciaPg7n7ZzVFcwqg==, tarball: file:projects/arm-changeanalysis.tgz}
version: 0.0.0
'@rush-temp/arm-changes@file:projects/arm-changes.tgz':
@@ -11105,22 +11105,34 @@ snapshots:
- vite
- webdriverio
- '@rush-temp/arm-changeanalysis@file:projects/arm-changeanalysis.tgz':
+ '@rush-temp/arm-changeanalysis@file:projects/arm-changeanalysis.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))':
dependencies:
- '@azure-tools/test-credential': 1.3.1
- '@azure-tools/test-recorder': 3.5.2
- '@types/chai': 4.3.20
- '@types/mocha': 10.0.10
'@types/node': 18.19.68
- chai: 4.5.0
- mocha: 11.0.2
- ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2)
+ '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)
+ '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8)
+ playwright: 1.49.1
tslib: 2.8.1
typescript: 5.7.2
+ vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))
transitivePeerDependencies:
- - '@swc/core'
- - '@swc/wasm'
+ - '@edge-runtime/vm'
+ - '@vitest/ui'
+ - bufferutil
+ - happy-dom
+ - jsdom
+ - less
+ - lightningcss
+ - msw
+ - safaridriver
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
- supports-color
+ - terser
+ - utf-8-validate
+ - vite
+ - webdriverio
'@rush-temp/arm-changes@file:projects/arm-changes.tgz':
dependencies:
diff --git a/sdk/changeanalysis/arm-changeanalysis/package.json b/sdk/changeanalysis/arm-changeanalysis/package.json
index 51ac38ed136d..29a0893acbe6 100644
--- a/sdk/changeanalysis/arm-changeanalysis/package.json
+++ b/sdk/changeanalysis/arm-changeanalysis/package.json
@@ -22,9 +22,9 @@
"isomorphic"
],
"license": "MIT",
- "main": "./dist/index.js",
- "module": "./dist-esm/src/index.js",
- "types": "./types/arm-changeanalysis.d.ts",
+ "main": "./dist/commonjs/index.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
@@ -115,5 +115,26 @@
"selfLink": false
},
"browser": "./dist/browser/index.js",
- "react-native": "./dist/react-native/index.js"
+ "react-native": "./dist/react-native/index.js",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "browser": {
+ "types": "./dist/browser/index.d.ts",
+ "default": "./dist/browser/index.js"
+ },
+ "react-native": {
+ "types": "./dist/react-native/index.d.ts",
+ "default": "./dist/react-native/index.js"
+ },
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ }
}
From f71733b3346395a86a3b09dfeb70654737d4b1c5 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:25 +0800
Subject: [PATCH 49/62] Migration: Update package.json, tsconfig.json, and
api-extractor.json
---
sdk/changes/arm-changes/api-extractor.json | 6 +-
sdk/changes/arm-changes/package.json | 61 +++++++++++--------
sdk/changes/arm-changes/tsconfig.json | 40 +++---------
sdk/changes/arm-changes/tsconfig.samples.json | 10 +++
sdk/changes/arm-changes/tsconfig.src.json | 3 +
sdk/changes/arm-changes/tsconfig.test.json | 6 ++
6 files changed, 67 insertions(+), 59 deletions(-)
create mode 100644 sdk/changes/arm-changes/tsconfig.samples.json
create mode 100644 sdk/changes/arm-changes/tsconfig.src.json
create mode 100644 sdk/changes/arm-changes/tsconfig.test.json
diff --git a/sdk/changes/arm-changes/api-extractor.json b/sdk/changes/arm-changes/api-extractor.json
index 56ec3ae5911b..abb49f21d093 100644
--- a/sdk/changes/arm-changes/api-extractor.json
+++ b/sdk/changes/arm-changes/api-extractor.json
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
- "mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
+ "mainEntryPointFilePath": "dist/esm/index.d.ts",
"docModel": {
"enabled": true
},
@@ -11,7 +11,7 @@
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
- "publicTrimmedFilePath": "./types/arm-changes.d.ts"
+ "publicTrimmedFilePath": "dist/arm-changes.d.ts"
},
"messages": {
"tsdocMessageReporting": {
@@ -28,4 +28,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/sdk/changes/arm-changes/package.json b/sdk/changes/arm-changes/package.json
index 58fcc6175373..915acec5c599 100644
--- a/sdk/changes/arm-changes/package.json
+++ b/sdk/changes/arm-changes/package.json
@@ -26,17 +26,17 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-changes.d.ts",
"devDependencies": {
- "@azure-tools/test-credential": "^1.0.0",
- "@azure-tools/test-recorder": "^3.0.0",
+ "@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.0.1",
- "@types/chai": "^4.2.8",
- "@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
- "chai": "^4.2.0",
- "mocha": "^11.0.2",
- "ts-node": "^10.0.0",
- "typescript": "~5.7.2"
+ "@vitest/browser": "^2.1.8",
+ "@vitest/coverage-istanbul": "^2.1.8",
+ "playwright": "^1.49.1",
+ "typescript": "~5.7.2",
+ "vitest": "^2.1.8"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/changes/arm-changes",
"repository": {
@@ -47,24 +47,14 @@
"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/*"
+ "review/",
+ "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": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api",
"build:browser": "echo skipped",
"build:node": "echo skipped",
"build:samples": "echo skipped.",
@@ -76,7 +66,7 @@
"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'",
+ "integration-test:node": "dev-tool run test:vitest --esm",
"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",
@@ -85,8 +75,8 @@
"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",
+ "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
+ "unit-test:node": "dev-tool run test:vitest",
"update-snippets": "echo skipped"
},
"sideEffects": false,
@@ -106,5 +96,24 @@
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-changes?view=azure-node-preview"
- }
+ },
+ "type": "module",
+ "tshy": {
+ "project": "./tsconfig.src.json",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": "./src/index.ts"
+ },
+ "dialects": [
+ "esm",
+ "commonjs"
+ ],
+ "esmDialects": [
+ "browser",
+ "react-native"
+ ],
+ "selfLink": false
+ },
+ "browser": "./dist/browser/index.js",
+ "react-native": "./dist/react-native/index.js"
}
diff --git a/sdk/changes/arm-changes/tsconfig.json b/sdk/changes/arm-changes/tsconfig.json
index 017e8571316c..19ceb382b521 100644
--- a/sdk/changes/arm-changes/tsconfig.json
+++ b/sdk/changes/arm-changes/tsconfig.json
@@ -1,33 +1,13 @@
{
- "compilerOptions": {
- "module": "es6",
- "moduleResolution": "node",
- "strict": true,
- "target": "es6",
- "sourceMap": true,
- "declarationMap": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "forceConsistentCasingInFileNames": true,
- "lib": [
- "es6",
- "dom"
- ],
- "declaration": true,
- "outDir": "./dist-esm",
- "importHelpers": true,
- "paths": {
- "@azure/arm-changes": [
- "./src/index"
- ]
+ "references": [
+ {
+ "path": "./tsconfig.src.json"
+ },
+ {
+ "path": "./tsconfig.samples.json"
+ },
+ {
+ "path": "./tsconfig.test.json"
}
- },
- "include": [
- "./src/**/*.ts",
- "./test/**/*.ts",
- "samples-dev/**/*.ts"
- ],
- "exclude": [
- "node_modules"
]
-}
\ No newline at end of file
+}
diff --git a/sdk/changes/arm-changes/tsconfig.samples.json b/sdk/changes/arm-changes/tsconfig.samples.json
new file mode 100644
index 000000000000..d26cef4635a5
--- /dev/null
+++ b/sdk/changes/arm-changes/tsconfig.samples.json
@@ -0,0 +1,10 @@
+{
+ "extends": "../../../tsconfig.samples.base.json",
+ "compilerOptions": {
+ "paths": {
+ "@azure/arm-changes": [
+ "./dist/esm"
+ ]
+ }
+ }
+}
diff --git a/sdk/changes/arm-changes/tsconfig.src.json b/sdk/changes/arm-changes/tsconfig.src.json
new file mode 100644
index 000000000000..bae70752dd38
--- /dev/null
+++ b/sdk/changes/arm-changes/tsconfig.src.json
@@ -0,0 +1,3 @@
+{
+ "extends": "../../../tsconfig.lib.json"
+}
diff --git a/sdk/changes/arm-changes/tsconfig.test.json b/sdk/changes/arm-changes/tsconfig.test.json
new file mode 100644
index 000000000000..3c2b783a8c1b
--- /dev/null
+++ b/sdk/changes/arm-changes/tsconfig.test.json
@@ -0,0 +1,6 @@
+{
+ "extends": [
+ "./tsconfig.src.json",
+ "../../../tsconfig.test.base.json"
+ ]
+}
From 4aeccda32844f82e6490f8d04601854359622ccc Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:25 +0800
Subject: [PATCH 50/62] Migration: Update test config
---
.../arm-changes/tsconfig.browser.config.json | 17 +++++++++++++++++
.../arm-changes/vitest.browser.config.ts | 17 +++++++++++++++++
sdk/changes/arm-changes/vitest.config.ts | 7 +++++++
sdk/changes/arm-changes/vitest.esm.config.ts | 12 ++++++++++++
4 files changed, 53 insertions(+)
create mode 100644 sdk/changes/arm-changes/tsconfig.browser.config.json
create mode 100644 sdk/changes/arm-changes/vitest.browser.config.ts
create mode 100644 sdk/changes/arm-changes/vitest.config.ts
create mode 100644 sdk/changes/arm-changes/vitest.esm.config.ts
diff --git a/sdk/changes/arm-changes/tsconfig.browser.config.json b/sdk/changes/arm-changes/tsconfig.browser.config.json
new file mode 100644
index 000000000000..b6586181d006
--- /dev/null
+++ b/sdk/changes/arm-changes/tsconfig.browser.config.json
@@ -0,0 +1,17 @@
+{
+ "extends": "./.tshy/build.json",
+ "include": [
+ "./src/**/*.ts",
+ "./src/**/*.mts",
+ "./test/**/*.spec.ts",
+ "./test/**/*.mts"
+ ],
+ "exclude": [
+ "./test/**/node/**/*.ts"
+ ],
+ "compilerOptions": {
+ "outDir": "./dist-test/browser",
+ "rootDir": ".",
+ "skipLibCheck": true
+ }
+}
diff --git a/sdk/changes/arm-changes/vitest.browser.config.ts b/sdk/changes/arm-changes/vitest.browser.config.ts
new file mode 100644
index 000000000000..b48c61b2ef46
--- /dev/null
+++ b/sdk/changes/arm-changes/vitest.browser.config.ts
@@ -0,0 +1,17 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { defineConfig, mergeConfig } from "vitest/config";
+import viteConfig from "../../../vitest.browser.shared.config.ts";
+
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ include: [
+ "dist-test/browser/test/**/*.spec.js",
+ ],
+ },
+ }),
+);
diff --git a/sdk/changes/arm-changes/vitest.config.ts b/sdk/changes/arm-changes/vitest.config.ts
new file mode 100644
index 000000000000..cc5cd85d4131
--- /dev/null
+++ b/sdk/changes/arm-changes/vitest.config.ts
@@ -0,0 +1,7 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import viteConfig from "../../../vitest.shared.config.ts";
+
+export default viteConfig;
diff --git a/sdk/changes/arm-changes/vitest.esm.config.ts b/sdk/changes/arm-changes/vitest.esm.config.ts
new file mode 100644
index 000000000000..a70127279fc9
--- /dev/null
+++ b/sdk/changes/arm-changes/vitest.esm.config.ts
@@ -0,0 +1,12 @@
+
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+import { mergeConfig } from "vitest/config";
+import vitestConfig from "./vitest.config.ts";
+import vitestEsmConfig from "../../../vitest.esm.shared.config.ts";
+
+export default mergeConfig(
+ vitestConfig,
+ vitestEsmConfig
+);
From 34d604e8aeea882ffc19be928335e5d6102597d0 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:25 +0800
Subject: [PATCH 51/62] Migration: Clean up files
From 5e538d03b9e7328959d8af51cae6da5bd5fbcf81 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:35 +0800
Subject: [PATCH 52/62] Migration: Apply codemod: "fixSourceFile"
---
sdk/changes/arm-changes/src/changesClient.ts | 6 +++---
sdk/changes/arm-changes/src/index.ts | 8 ++++----
sdk/changes/arm-changes/src/operations/changes.ts | 12 ++++++------
sdk/changes/arm-changes/src/operations/index.ts | 2 +-
.../arm-changes/src/operationsInterfaces/changes.ts | 2 +-
.../arm-changes/src/operationsInterfaces/index.ts | 2 +-
sdk/changes/arm-changes/test/sampleTest.ts | 10 +++-------
7 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/sdk/changes/arm-changes/src/changesClient.ts b/sdk/changes/arm-changes/src/changesClient.ts
index 446f9a2b2c66..6fabfe9185a6 100644
--- a/sdk/changes/arm-changes/src/changesClient.ts
+++ b/sdk/changes/arm-changes/src/changesClient.ts
@@ -14,9 +14,9 @@ import {
SendRequest
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
-import { ChangesImpl } from "./operations";
-import { Changes } from "./operationsInterfaces";
-import { ChangesClientOptionalParams } from "./models";
+import { ChangesImpl } from "./operations/index.js";
+import { Changes } from "./operationsInterfaces/index.js";
+import { ChangesClientOptionalParams } from "./models/index.js";
export class ChangesClient extends coreClient.ServiceClient {
$host: string;
diff --git a/sdk/changes/arm-changes/src/index.ts b/sdk/changes/arm-changes/src/index.ts
index 1298fd732dcb..bc1fd5936f13 100644
--- a/sdk/changes/arm-changes/src/index.ts
+++ b/sdk/changes/arm-changes/src/index.ts
@@ -7,7 +7,7 @@
*/
///
-export { getContinuationToken } from "./pagingHelper";
-export * from "./models";
-export { ChangesClient } from "./changesClient";
-export * from "./operationsInterfaces";
+export { getContinuationToken } from "./pagingHelper.js";
+export * from "./models/index.js";
+export { ChangesClient } from "./changesClient.js";
+export * from "./operationsInterfaces/index.js";
diff --git a/sdk/changes/arm-changes/src/operations/changes.ts b/sdk/changes/arm-changes/src/operations/changes.ts
index 7c5e470c5ae0..05ba10181d18 100644
--- a/sdk/changes/arm-changes/src/operations/changes.ts
+++ b/sdk/changes/arm-changes/src/operations/changes.ts
@@ -7,12 +7,12 @@
*/
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
-import { setContinuationToken } from "../pagingHelper";
-import { Changes } from "../operationsInterfaces";
+import { setContinuationToken } from "../pagingHelper.js";
+import { Changes } from "../operationsInterfaces/index.js";
import * as coreClient from "@azure/core-client";
-import * as Mappers from "../models/mappers";
-import * as Parameters from "../models/parameters";
-import { ChangesClient } from "../changesClient";
+import * as Mappers from "../models/mappers.js";
+import * as Parameters from "../models/parameters.js";
+import { ChangesClient } from "../changesClient.js";
import {
ChangeResourceResult,
ChangesListNextOptionalParams,
@@ -21,7 +21,7 @@ import {
ChangesGetOptionalParams,
ChangesGetResponse,
ChangesListNextResponse
-} from "../models";
+} from "../models/index.js";
///
/** Class containing Changes operations. */
diff --git a/sdk/changes/arm-changes/src/operations/index.ts b/sdk/changes/arm-changes/src/operations/index.ts
index c59e4d102e7e..7ff3f81dcf84 100644
--- a/sdk/changes/arm-changes/src/operations/index.ts
+++ b/sdk/changes/arm-changes/src/operations/index.ts
@@ -6,4 +6,4 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./changes";
+export * from "./changes.js";
diff --git a/sdk/changes/arm-changes/src/operationsInterfaces/changes.ts b/sdk/changes/arm-changes/src/operationsInterfaces/changes.ts
index b873985b4b21..ab5f2cdd54a3 100644
--- a/sdk/changes/arm-changes/src/operationsInterfaces/changes.ts
+++ b/sdk/changes/arm-changes/src/operationsInterfaces/changes.ts
@@ -12,7 +12,7 @@ import {
ChangesListOptionalParams,
ChangesGetOptionalParams,
ChangesGetResponse
-} from "../models";
+} from "../models/index.js";
///
/** Interface representing a Changes. */
diff --git a/sdk/changes/arm-changes/src/operationsInterfaces/index.ts b/sdk/changes/arm-changes/src/operationsInterfaces/index.ts
index c59e4d102e7e..7ff3f81dcf84 100644
--- a/sdk/changes/arm-changes/src/operationsInterfaces/index.ts
+++ b/sdk/changes/arm-changes/src/operationsInterfaces/index.ts
@@ -6,4 +6,4 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
-export * from "./changes";
+export * from "./changes.js";
diff --git a/sdk/changes/arm-changes/test/sampleTest.ts b/sdk/changes/arm-changes/test/sampleTest.ts
index 8ff7deb0acbe..f0d6ea6885e4 100644
--- a/sdk/changes/arm-changes/test/sampleTest.ts
+++ b/sdk/changes/arm-changes/test/sampleTest.ts
@@ -8,11 +8,7 @@
import {
Recorder,
- RecorderStartOptions,
- env
-} from "@azure-tools/test-recorder";
-import { assert } from "chai";
-import { Context } from "mocha";
+ RecorderStartOptions} from "@azure-tools/test-recorder";
const replaceableVariables: Record = {
AZURE_CLIENT_ID: "azure_client_id",
@@ -32,8 +28,8 @@ const recorderOptions: RecorderStartOptions = {
describe("My test", () => {
let recorder: Recorder;
- beforeEach(async function (this: Context) {
- recorder = new Recorder(this.currentTest);
+ beforeEach(async function (ctx) {
+ recorder = new Recorder(ctx);
await recorder.start(recorderOptions);
});
From 6aa4b7de775cc39ea4da4fb6ea9856ca64f421b7 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:36 +0800
Subject: [PATCH 53/62] Migration: Apply codemod: "fixTestingImports"
From b6db583cd7bed7c1d2661eeb1474d24a6ea3242c Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:36 +0800
Subject: [PATCH 54/62] Migration: Apply codemod: "replaceAssertIsRejected"
From 93b7034fc04e8eb5322d07be7dbc2327ad219871 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:37 +0800
Subject: [PATCH 55/62] Migration: Apply codemod: "replaceSinonStub"
From dc06af16b8238a7cc9654ba5d4d9f02f3f85b2f0 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:38 +0800
Subject: [PATCH 56/62] Migration: Apply codemod: "addViHelper"
From a13c4da5fadcc9ca654ceb106043dab0bb6f1d1d Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:38 +0800
Subject: [PATCH 57/62] Migration: Apply codemod: "replaceSupportTracing"
From 22911f097808030c7b74f4c7d5b39471d80f9e27 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:39 +0800
Subject: [PATCH 58/62] Migration: Apply codemod: "replaceTestUtils"
From 9f7c91c321c728fa47d8d1c261fed33c41c0f7ea Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:25:41 +0800
Subject: [PATCH 59/62] Migration: rushx format
From cff3aeda238d003a0da014411e7414a93ecf72b0 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Wed, 25 Dec 2024 15:27:53 +0800
Subject: [PATCH 60/62] update
---
common/config/rush/pnpm-lock.yaml | 36 ++++++++++++++++++----------
sdk/changes/arm-changes/package.json | 29 ++++++++++++++++++----
2 files changed, 49 insertions(+), 16 deletions(-)
diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml
index bc574a939fc2..bb970a1740be 100644
--- a/common/config/rush/pnpm-lock.yaml
+++ b/common/config/rush/pnpm-lock.yaml
@@ -165,7 +165,7 @@ importers:
version: file:projects/arm-changeanalysis.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-changes':
specifier: file:./projects/arm-changes.tgz
- version: file:projects/arm-changes.tgz
+ version: file:projects/arm-changes.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))
'@rush-temp/arm-chaos':
specifier: file:./projects/arm-chaos.tgz
version: file:projects/arm-chaos.tgz
@@ -2691,7 +2691,7 @@ packages:
version: 0.0.0
'@rush-temp/arm-changes@file:projects/arm-changes.tgz':
- resolution: {integrity: sha512-VHWw1qKvig50NsvnucBYhZPhy5C4VhWqdXeJMzH6X6nEo69rLG9wO4HucSdR9HfqFZ5S44voYj7LOK5X7eQb0g==, tarball: file:projects/arm-changes.tgz}
+ resolution: {integrity: sha512-4CKEY1ZNr54+AmbrsSti1aeZKbD28k/gzm8hOTuvd6E0QwFI6bQUDgi9A7eCkunylj0iscah/17FpPxYLYUwuA==, tarball: file:projects/arm-changes.tgz}
version: 0.0.0
'@rush-temp/arm-chaos@file:projects/arm-chaos.tgz':
@@ -11134,22 +11134,34 @@ snapshots:
- vite
- webdriverio
- '@rush-temp/arm-changes@file:projects/arm-changes.tgz':
+ '@rush-temp/arm-changes@file:projects/arm-changes.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))(vite@5.4.11(@types/node@22.7.9))':
dependencies:
- '@azure-tools/test-credential': 1.3.1
- '@azure-tools/test-recorder': 3.5.2
- '@types/chai': 4.3.20
- '@types/mocha': 10.0.10
'@types/node': 18.19.68
- chai: 4.5.0
- mocha: 11.0.2
- ts-node: 10.9.2(@types/node@18.19.68)(typescript@5.7.2)
+ '@vitest/browser': 2.1.8(@types/node@18.19.68)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8)
+ '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8)
+ playwright: 1.49.1
tslib: 2.8.1
typescript: 5.7.2
+ vitest: 2.1.8(@types/node@18.19.68)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.2))
transitivePeerDependencies:
- - '@swc/core'
- - '@swc/wasm'
+ - '@edge-runtime/vm'
+ - '@vitest/ui'
+ - bufferutil
+ - happy-dom
+ - jsdom
+ - less
+ - lightningcss
+ - msw
+ - safaridriver
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
- supports-color
+ - terser
+ - utf-8-validate
+ - vite
+ - webdriverio
'@rush-temp/arm-chaos@file:projects/arm-chaos.tgz':
dependencies:
diff --git a/sdk/changes/arm-changes/package.json b/sdk/changes/arm-changes/package.json
index 915acec5c599..5a459e9d16df 100644
--- a/sdk/changes/arm-changes/package.json
+++ b/sdk/changes/arm-changes/package.json
@@ -22,9 +22,9 @@
"isomorphic"
],
"license": "MIT",
- "main": "./dist/index.js",
- "module": "./dist-esm/src/index.js",
- "types": "./types/arm-changes.d.ts",
+ "main": "./dist/commonjs/index.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/commonjs/index.d.ts",
"devDependencies": {
"@azure-tools/test-credential": "^2.0.0",
"@azure-tools/test-recorder": "^4.1.0",
@@ -115,5 +115,26 @@
"selfLink": false
},
"browser": "./dist/browser/index.js",
- "react-native": "./dist/react-native/index.js"
+ "react-native": "./dist/react-native/index.js",
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "browser": {
+ "types": "./dist/browser/index.d.ts",
+ "default": "./dist/browser/index.js"
+ },
+ "react-native": {
+ "types": "./dist/react-native/index.d.ts",
+ "default": "./dist/react-native/index.js"
+ },
+ "import": {
+ "types": "./dist/esm/index.d.ts",
+ "default": "./dist/esm/index.js"
+ },
+ "require": {
+ "types": "./dist/commonjs/index.d.ts",
+ "default": "./dist/commonjs/index.js"
+ }
+ }
+ }
}
From 0a995eafc8b12f07814c385a59e5882a2638a911 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Thu, 26 Dec 2024 10:01:47 +0800
Subject: [PATCH 61/62] update
---
.../test/{sampleTest.ts => sampleTest.spec.ts} | 4 +++-
.../{botservice_examples.ts => botservice_examples.spec.ts} | 2 +-
.../test/{sampleTest.ts => sampleTest.spec.ts} | 4 +++-
.../arm-changes/test/{sampleTest.ts => sampleTest.spec.ts} | 4 +++-
4 files changed, 10 insertions(+), 4 deletions(-)
rename sdk/billingbenefits/arm-billingbenefits/test/{sampleTest.ts => sampleTest.spec.ts} (90%)
rename sdk/botservice/arm-botservice/test/{botservice_examples.ts => botservice_examples.spec.ts} (96%)
rename sdk/changeanalysis/arm-changeanalysis/test/{sampleTest.ts => sampleTest.spec.ts} (90%)
rename sdk/changes/arm-changes/test/{sampleTest.ts => sampleTest.spec.ts} (90%)
diff --git a/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts b/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.spec.ts
similarity index 90%
rename from sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts
rename to sdk/billingbenefits/arm-billingbenefits/test/sampleTest.spec.ts
index f0d6ea6885e4..e25d3db273e7 100644
--- a/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/test/sampleTest.spec.ts
@@ -8,7 +8,9 @@
import {
Recorder,
- RecorderStartOptions} from "@azure-tools/test-recorder";
+ RecorderStartOptions
+} from "@azure-tools/test-recorder";
+import { afterEach, beforeEach, describe, it } from "vitest";
const replaceableVariables: Record = {
AZURE_CLIENT_ID: "azure_client_id",
diff --git a/sdk/botservice/arm-botservice/test/botservice_examples.ts b/sdk/botservice/arm-botservice/test/botservice_examples.spec.ts
similarity index 96%
rename from sdk/botservice/arm-botservice/test/botservice_examples.ts
rename to sdk/botservice/arm-botservice/test/botservice_examples.spec.ts
index 8ece31c924a0..67d80c929582 100644
--- a/sdk/botservice/arm-botservice/test/botservice_examples.ts
+++ b/sdk/botservice/arm-botservice/test/botservice_examples.spec.ts
@@ -14,7 +14,7 @@ import {
} from "@azure-tools/test-recorder";
import { createTestCredential } from "@azure-tools/test-credential";
import { AzureBotService } from "../src/azureBotService.js";
-import { assert } from "vitest";
+import { afterEach, assert, beforeEach, describe, it } from "vitest";
const replaceableVariables: Record = {
SUBSCRIPTION_ID: "azure_subscription_id"
diff --git a/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts b/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.spec.ts
similarity index 90%
rename from sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts
rename to sdk/changeanalysis/arm-changeanalysis/test/sampleTest.spec.ts
index f0d6ea6885e4..e25d3db273e7 100644
--- a/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/test/sampleTest.spec.ts
@@ -8,7 +8,9 @@
import {
Recorder,
- RecorderStartOptions} from "@azure-tools/test-recorder";
+ RecorderStartOptions
+} from "@azure-tools/test-recorder";
+import { afterEach, beforeEach, describe, it } from "vitest";
const replaceableVariables: Record = {
AZURE_CLIENT_ID: "azure_client_id",
diff --git a/sdk/changes/arm-changes/test/sampleTest.ts b/sdk/changes/arm-changes/test/sampleTest.spec.ts
similarity index 90%
rename from sdk/changes/arm-changes/test/sampleTest.ts
rename to sdk/changes/arm-changes/test/sampleTest.spec.ts
index f0d6ea6885e4..e25d3db273e7 100644
--- a/sdk/changes/arm-changes/test/sampleTest.ts
+++ b/sdk/changes/arm-changes/test/sampleTest.spec.ts
@@ -8,7 +8,9 @@
import {
Recorder,
- RecorderStartOptions} from "@azure-tools/test-recorder";
+ RecorderStartOptions
+} from "@azure-tools/test-recorder";
+import { afterEach, beforeEach, describe, it } from "vitest";
const replaceableVariables: Record = {
AZURE_CLIENT_ID: "azure_client_id",
From 12c25a8a88f3e8b1ad146c1cd6c91e506dccfa29 Mon Sep 17 00:00:00 2001
From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com>
Date: Fri, 27 Dec 2024 16:35:01 +0800
Subject: [PATCH 62/62] update
---
.../arm-billingbenefits/vitest.config.ts | 12 ++++++++++--
sdk/botservice/arm-botservice/vitest.config.ts | 12 ++++++++++--
sdk/cdn/arm-cdn/vitest.config.ts | 12 ++++++++++--
.../arm-changeanalysis/vitest.config.ts | 12 ++++++++++--
sdk/changes/arm-changes/vitest.config.ts | 12 ++++++++++--
5 files changed, 50 insertions(+), 10 deletions(-)
diff --git a/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts b/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts
index cc5cd85d4131..2a4750c84292 100644
--- a/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts
+++ b/sdk/billingbenefits/arm-billingbenefits/vitest.config.ts
@@ -1,7 +1,15 @@
-
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";
-export default viteConfig;
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ hookTimeout: 1200000,
+ testTimeout: 1200000,
+ },
+ }),
+);
diff --git a/sdk/botservice/arm-botservice/vitest.config.ts b/sdk/botservice/arm-botservice/vitest.config.ts
index cc5cd85d4131..2a4750c84292 100644
--- a/sdk/botservice/arm-botservice/vitest.config.ts
+++ b/sdk/botservice/arm-botservice/vitest.config.ts
@@ -1,7 +1,15 @@
-
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";
-export default viteConfig;
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ hookTimeout: 1200000,
+ testTimeout: 1200000,
+ },
+ }),
+);
diff --git a/sdk/cdn/arm-cdn/vitest.config.ts b/sdk/cdn/arm-cdn/vitest.config.ts
index cc5cd85d4131..2a4750c84292 100644
--- a/sdk/cdn/arm-cdn/vitest.config.ts
+++ b/sdk/cdn/arm-cdn/vitest.config.ts
@@ -1,7 +1,15 @@
-
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";
-export default viteConfig;
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ hookTimeout: 1200000,
+ testTimeout: 1200000,
+ },
+ }),
+);
diff --git a/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts b/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts
index cc5cd85d4131..2a4750c84292 100644
--- a/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts
+++ b/sdk/changeanalysis/arm-changeanalysis/vitest.config.ts
@@ -1,7 +1,15 @@
-
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";
-export default viteConfig;
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ hookTimeout: 1200000,
+ testTimeout: 1200000,
+ },
+ }),
+);
diff --git a/sdk/changes/arm-changes/vitest.config.ts b/sdk/changes/arm-changes/vitest.config.ts
index cc5cd85d4131..2a4750c84292 100644
--- a/sdk/changes/arm-changes/vitest.config.ts
+++ b/sdk/changes/arm-changes/vitest.config.ts
@@ -1,7 +1,15 @@
-
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";
-export default viteConfig;
+export default mergeConfig(
+ viteConfig,
+ defineConfig({
+ test: {
+ hookTimeout: 1200000,
+ testTimeout: 1200000,
+ },
+ }),
+);