diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 78d3769a9be2..653ef988f5e0 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -168,22 +168,22 @@ importers: version: file:projects/arm-changes.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(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 + version: file:projects/arm-chaos.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-cognitiveservices': specifier: file:./projects/arm-cognitiveservices.tgz - version: file:projects/arm-cognitiveservices.tgz + version: file:projects/arm-cognitiveservices.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-commerce': specifier: file:./projects/arm-commerce.tgz - version: file:projects/arm-commerce.tgz + version: file:projects/arm-commerce.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-commerce-profile-2020-09-01-hybrid': specifier: file:./projects/arm-commerce-profile-2020-09-01-hybrid.tgz - version: file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz + version: file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-commitmentplans': specifier: file:./projects/arm-commitmentplans.tgz version: file:projects/arm-commitmentplans.tgz '@rush-temp/arm-communication': specifier: file:./projects/arm-communication.tgz - version: file:projects/arm-communication.tgz + version: file:projects/arm-communication.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) '@rush-temp/arm-compute': specifier: file:./projects/arm-compute.tgz version: file:projects/arm-compute.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9)) @@ -2563,15 +2563,15 @@ packages: version: 0.0.0 '@rush-temp/arm-apimanagement@file:projects/arm-apimanagement.tgz': - resolution: {integrity: sha512-21fUiCFQejze8e2l3PwTiHFc8KDuj3L8nXnEeFExNELM/nS+iCf6rEih+d5pe0+O6rQ3camxDNAA223kC/eBCA==, tarball: file:projects/arm-apimanagement.tgz} + resolution: {integrity: sha512-Oo7NsnCPAlo7YDMq88CdrMM+T3Ul6F7PyjMSQ3BJzua1xVx0Z3ZglwoW4ca7SNdJaPqIjdtInqMltmTdc4V4zw==, tarball: file:projects/arm-apimanagement.tgz} version: 0.0.0 '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz': - resolution: {integrity: sha512-wVhFZffEgVUEVkJ/JXkXAw7AgsKAt9t4YdiDqhT85Os3EHVQCfs9zL2GOYo1TsJW8B94xeB1Q8NR5Gjb6tYUsA==, tarball: file:projects/arm-appcomplianceautomation.tgz} + resolution: {integrity: sha512-zB3KF5bcZVyCGC44uZFL/cNLbx9wHvVSixB+MibWs/vUrYJkSjn/aMAla40Y2ohdvSG0MQErrrykZ6xh0/ZzEQ==, tarball: file:projects/arm-appcomplianceautomation.tgz} version: 0.0.0 '@rush-temp/arm-appconfiguration@file:projects/arm-appconfiguration.tgz': - resolution: {integrity: sha512-X9vtg38hrEXVCKUdUFtZRTnbI4l+PzBGYO9lQYuimnRTxCMiTXc6GGjbOVQTTBzUZGfKwqNh0KH8+tCc2uwlPw==, tarball: file:projects/arm-appconfiguration.tgz} + resolution: {integrity: sha512-Ob7iFm0aHcW5QKlrWG9nT9s6qrr/MMxtZUp6PnTwaa0d5fnCzaeODXaJJuLEOuc3/o1JW5duk3dudzYVq/6OJA==, tarball: file:projects/arm-appconfiguration.tgz} version: 0.0.0 '@rush-temp/arm-appcontainers@file:projects/arm-appcontainers.tgz': @@ -2671,19 +2671,19 @@ packages: version: 0.0.0 '@rush-temp/arm-chaos@file:projects/arm-chaos.tgz': - resolution: {integrity: sha512-55gboIlBeU8bjXj/a7mwbUChnuaozfbkLMztpCxXQABI85EYe83ffl9VgVqm7iXy61tF6gUOMphDbeSfKFc4RQ==, tarball: file:projects/arm-chaos.tgz} + resolution: {integrity: sha512-5bjNARdrAOZd7H6XOMI3Bh86u5ALUwWTq+DVrHuCdTnt6ey41sl6pp1vSrdJ4J3XZcH9lue7VEfWUTZ2qire8w==, tarball: file:projects/arm-chaos.tgz} version: 0.0.0 '@rush-temp/arm-cognitiveservices@file:projects/arm-cognitiveservices.tgz': - resolution: {integrity: sha512-DHozZplb6FyQBbkRxDi2AblZ3XSgQ7j4Xs4r7j2hqa7rchpDHN18jnTzU62ewMVeiOby6XtWxXmYPSqXBqN/kQ==, tarball: file:projects/arm-cognitiveservices.tgz} + resolution: {integrity: sha512-wVX7iLW0gh5t+5NhpQHLrmqd40QkPnBXDg6S95bcMR6oVyxH7AZjY7kSMVt0giY1HascsZvXMGRUoW+ReQRlCg==, tarball: file:projects/arm-cognitiveservices.tgz} version: 0.0.0 '@rush-temp/arm-commerce-profile-2020-09-01-hybrid@file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz': - resolution: {integrity: sha512-/jTMRk6+nqbThGMAx6pEmbzgcL8Sevfsq9VoVlTYNPRbPp2e4VOx6QUAjFfHqLcHfv1dgODFm607F9WzQBj+jQ==, tarball: file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz} + resolution: {integrity: sha512-BRIK5ZH2ELXs6VzT9EiCUzSwvfVl95kQ5q6LP7ifFXFKj+h6jsP7US+0tTomlxVW6f1hWprP+21VdXTdzC13KQ==, tarball: file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz} version: 0.0.0 '@rush-temp/arm-commerce@file:projects/arm-commerce.tgz': - resolution: {integrity: sha512-6+mOYVf9aO1LJU2IRK109qacdGtW8b3zfmmg0PCdsrStx3cl99w2EC4OhWJIUDvgQlGDDPUlgtrEOD9KVaZWWw==, tarball: file:projects/arm-commerce.tgz} + resolution: {integrity: sha512-StrevIYD6b6YFSAEKAkBfEtLexT8qfn3UIO1c8sfaIkZY73ol85Y7ZlqGJaJqwJABD8J/O4Vm3+PCtxDLCMlSg==, tarball: file:projects/arm-commerce.tgz} version: 0.0.0 '@rush-temp/arm-commitmentplans@file:projects/arm-commitmentplans.tgz': @@ -2691,7 +2691,7 @@ packages: version: 0.0.0 '@rush-temp/arm-communication@file:projects/arm-communication.tgz': - resolution: {integrity: sha512-ky8czAhv63ppT0wDJG83fbQb3dzTHNFHrDYI0RReDZXfRhJMc0WBeLDVrARnqFeS4tg6gM+1u0BJwtvfGKhO9w==, tarball: file:projects/arm-communication.tgz} + resolution: {integrity: sha512-5jnCqpuY6z3rgWgy6kM49tMQ8GmBuuhmHfmTPkELkUj/SY69lfQO199xWweZNLBANjPQ1oV7RBow/mDroYiOIA==, tarball: file:projects/arm-communication.tgz} version: 0.0.0 '@rush-temp/arm-compute-1@file:projects/arm-compute-1.tgz': @@ -10560,7 +10560,6 @@ snapshots: '@rush-temp/arm-appcomplianceautomation@file:projects/arm-appcomplianceautomation.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.11(@types/node@22.7.9))': dependencies: - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 '@types/node': 18.19.70 '@vitest/browser': 2.1.8(@types/node@18.19.70)(playwright@1.49.1)(typescript@5.7.2)(vite@5.4.11(@types/node@22.7.9))(vitest@2.1.8) @@ -10568,7 +10567,6 @@ snapshots: dotenv: 16.4.7 playwright: 1.49.1 tslib: 2.8.1 - tsx: 4.19.2 typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: @@ -10598,13 +10596,9 @@ snapshots: '@types/node': 18.19.70 '@vitest/browser': 2.1.8(@types/node@18.19.70)(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) - cross-env: 7.0.3 dotenv: 16.4.7 - mkdirp: 3.0.1 playwright: 1.49.1 - rimraf: 5.0.10 tslib: 2.8.1 - tsx: 4.19.2 typescript: 5.7.2 vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: @@ -11379,81 +11373,129 @@ snapshots: - vite - webdriverio - '@rush-temp/arm-chaos@file:projects/arm-chaos.tgz': + '@rush-temp/arm-chaos@file:projects/arm-chaos.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(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/arm-cosmosdb': 16.0.0-beta.6 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(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.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) 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-cognitiveservices@file:projects/arm-cognitiveservices.tgz': + '@rush-temp/arm-cognitiveservices@file:projects/arm-cognitiveservices.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(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/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(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: 10.8.2 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 tsx: 4.19.2 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) 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-commerce-profile-2020-09-01-hybrid@file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz': + '@rush-temp/arm-commerce-profile-2020-09-01-hybrid@file:projects/arm-commerce-profile-2020-09-01-hybrid.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(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.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(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.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) 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-commerce@file:projects/arm-commerce.tgz': + '@rush-temp/arm-commerce@file:projects/arm-commerce.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(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.70 - chai: 4.5.0 - mocha: 11.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + '@vitest/browser': 2.1.8(@types/node@18.19.70)(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.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) 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-commitmentplans@file:projects/arm-commitmentplans.tgz': dependencies: @@ -11472,25 +11514,37 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-communication@file:projects/arm-communication.tgz': + '@rush-temp/arm-communication@file:projects/arm-communication.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(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.70 - chai: 4.5.0 + '@vitest/browser': 2.1.8(@types/node@18.19.70)(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.1.0 - ts-node: 10.9.2(@types/node@18.19.70)(typescript@5.7.2) + playwright: 1.49.1 tslib: 2.8.1 typescript: 5.7.2 + vitest: 2.1.8(@types/node@18.19.70)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) 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-compute-1@file:projects/arm-compute-1.tgz': dependencies: diff --git a/sdk/chaos/arm-chaos/api-extractor.json b/sdk/chaos/arm-chaos/api-extractor.json index ea7586bb8823..bce93132f81d 100644 --- a/sdk/chaos/arm-chaos/api-extractor.json +++ b/sdk/chaos/arm-chaos/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-chaos.d.ts" + "publicTrimmedFilePath": "dist/arm-chaos.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/chaos/arm-chaos/package.json b/sdk/chaos/arm-chaos/package.json index d6dc60416aae..03a9c356ef11 100644 --- a/sdk/chaos/arm-chaos/package.json +++ b/sdk/chaos/arm-chaos/package.json @@ -24,23 +24,23 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-chaos.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.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/arm-cosmosdb": "16.0.0-beta.6", "@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", @@ -50,24 +50,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.", @@ -79,7 +69,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", @@ -89,7 +79,7 @@ "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:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -110,5 +100,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-chaos?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", + "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" + } + } } } diff --git a/sdk/chaos/arm-chaos/samples-dev/capabilitiesCreateOrUpdateSample.ts b/sdk/chaos/arm-chaos/samples-dev/capabilitiesCreateOrUpdateSample.ts index 0958fc1634b7..35f6327d26e3 100644 --- a/sdk/chaos/arm-chaos/samples-dev/capabilitiesCreateOrUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/capabilitiesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Capability, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a Capability resource that extends a Target resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/capabilitiesDeleteSample.ts b/sdk/chaos/arm-chaos/samples-dev/capabilitiesDeleteSample.ts index 5968a90a3187..01dbb7c5867d 100644 --- a/sdk/chaos/arm-chaos/samples-dev/capabilitiesDeleteSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/capabilitiesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a Capability that extends a Target resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/capabilitiesGetSample.ts b/sdk/chaos/arm-chaos/samples-dev/capabilitiesGetSample.ts index db94cd289376..911f6523de46 100644 --- a/sdk/chaos/arm-chaos/samples-dev/capabilitiesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/capabilitiesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Capability resource that extends a Target resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/capabilitiesListSample.ts b/sdk/chaos/arm-chaos/samples-dev/capabilitiesListSample.ts index 263484ea28ef..f7c63c2b32da 100644 --- a/sdk/chaos/arm-chaos/samples-dev/capabilitiesListSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/capabilitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Capability resources that extend a Target resource.. diff --git a/sdk/chaos/arm-chaos/samples-dev/capabilityTypesGetSample.ts b/sdk/chaos/arm-chaos/samples-dev/capabilityTypesGetSample.ts index 1a91c92d7027..9a77fa8283d3 100644 --- a/sdk/chaos/arm-chaos/samples-dev/capabilityTypesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/capabilityTypesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Capability Type resource for given Target Type and location. diff --git a/sdk/chaos/arm-chaos/samples-dev/capabilityTypesListSample.ts b/sdk/chaos/arm-chaos/samples-dev/capabilityTypesListSample.ts index 4ff7a6213adf..224ab99c10e7 100644 --- a/sdk/chaos/arm-chaos/samples-dev/capabilityTypesListSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/capabilityTypesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Capability Type resources for given Target Type and location. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsCancelSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsCancelSample.ts index e073dea9699a..99039e7de80f 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsCancelSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsCancelSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Cancel a running Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsCreateOrUpdateSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsCreateOrUpdateSample.ts index 22565db561d7..e851b4e60401 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsCreateOrUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Experiment, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsDeleteSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsDeleteSample.ts index d9e873876a65..0d56e94363e0 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsDeleteSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsExecutionDetailsSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsExecutionDetailsSample.ts index cfd5673dc76a..9eb4181015fa 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsExecutionDetailsSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsExecutionDetailsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Execution details of an experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsGetExecutionSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsGetExecutionSample.ts index e45a084b2456..d2b8e0404906 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsGetExecutionSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsGetExecutionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get an execution of an Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsGetSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsGetSample.ts index 1fac52bf1364..45a99cf4c699 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsGetSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsListAllExecutionsSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsListAllExecutionsSample.ts index 352d507bb2a0..e67eb3bdc214 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsListAllExecutionsSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsListAllExecutionsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of executions of an Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsListAllSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsListAllSample.ts index bc6b8263697b..f29f33fc1804 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsListAllSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsListAllSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Experiment resources in a subscription. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsListSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsListSample.ts index a18cd79f1366..5105358feb46 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsListSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsListSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Experiment resources in a resource group. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsStartSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsStartSample.ts index 9a21d046d472..388a6f5abba1 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsStartSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsStartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Start a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/experimentsUpdateSample.ts b/sdk/chaos/arm-chaos/samples-dev/experimentsUpdateSample.ts index 273e6f714ad3..26234461b0f4 100644 --- a/sdk/chaos/arm-chaos/samples-dev/experimentsUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/experimentsUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ExperimentUpdate, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to update an experiment. diff --git a/sdk/chaos/arm-chaos/samples-dev/operationStatusesGetSample.ts b/sdk/chaos/arm-chaos/samples-dev/operationStatusesGetSample.ts index 24cdf86c4006..82aa5a5074fb 100644 --- a/sdk/chaos/arm-chaos/samples-dev/operationStatusesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/operationStatusesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the status of a long running azure asynchronous operation. diff --git a/sdk/chaos/arm-chaos/samples-dev/targetTypesGetSample.ts b/sdk/chaos/arm-chaos/samples-dev/targetTypesGetSample.ts index 6a4692e39e79..0cb3bbd1fced 100644 --- a/sdk/chaos/arm-chaos/samples-dev/targetTypesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/targetTypesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Target Type resources for given location. diff --git a/sdk/chaos/arm-chaos/samples-dev/targetTypesListSample.ts b/sdk/chaos/arm-chaos/samples-dev/targetTypesListSample.ts index b29c7c2be270..1d12d3ca89ef 100644 --- a/sdk/chaos/arm-chaos/samples-dev/targetTypesListSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/targetTypesListSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Target Type resources for given location. diff --git a/sdk/chaos/arm-chaos/samples-dev/targetsCreateOrUpdateSample.ts b/sdk/chaos/arm-chaos/samples-dev/targetsCreateOrUpdateSample.ts index 5fa1524a1d5c..72a1cdef49f8 100644 --- a/sdk/chaos/arm-chaos/samples-dev/targetsCreateOrUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/targetsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Target, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a Target resource that extends a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/targetsDeleteSample.ts b/sdk/chaos/arm-chaos/samples-dev/targetsDeleteSample.ts index 364a53bf9f0e..ac1fa4e133f2 100644 --- a/sdk/chaos/arm-chaos/samples-dev/targetsDeleteSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/targetsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a Target resource that extends a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/targetsGetSample.ts b/sdk/chaos/arm-chaos/samples-dev/targetsGetSample.ts index 82ecb31268fa..5c7d323d7392 100644 --- a/sdk/chaos/arm-chaos/samples-dev/targetsGetSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/targetsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Target resource that extends a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples-dev/targetsListSample.ts b/sdk/chaos/arm-chaos/samples-dev/targetsListSample.ts index 24e69aa2d109..570fa92aa6ad 100644 --- a/sdk/chaos/arm-chaos/samples-dev/targetsListSample.ts +++ b/sdk/chaos/arm-chaos/samples-dev/targetsListSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Target resources that extend a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesCreateOrUpdateSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesCreateOrUpdateSample.ts index 0958fc1634b7..35f6327d26e3 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesCreateOrUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Capability, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a Capability resource that extends a Target resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesDeleteSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesDeleteSample.ts index 5968a90a3187..01dbb7c5867d 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesDeleteSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a Capability that extends a Target resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesGetSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesGetSample.ts index db94cd289376..911f6523de46 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Capability resource that extends a Target resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesListSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesListSample.ts index 263484ea28ef..f7c63c2b32da 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesListSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Capability resources that extend a Target resource.. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesGetSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesGetSample.ts index 1a91c92d7027..9a77fa8283d3 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Capability Type resource for given Target Type and location. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesListSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesListSample.ts index 4ff7a6213adf..224ab99c10e7 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesListSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/capabilityTypesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Capability Type resources for given Target Type and location. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCancelSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCancelSample.ts index e073dea9699a..99039e7de80f 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCancelSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCancelSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Cancel a running Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCreateOrUpdateSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCreateOrUpdateSample.ts index 22565db561d7..e851b4e60401 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCreateOrUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Experiment, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsDeleteSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsDeleteSample.ts index d9e873876a65..0d56e94363e0 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsDeleteSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsExecutionDetailsSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsExecutionDetailsSample.ts index cfd5673dc76a..9eb4181015fa 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsExecutionDetailsSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsExecutionDetailsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Execution details of an experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetExecutionSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetExecutionSample.ts index e45a084b2456..d2b8e0404906 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetExecutionSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetExecutionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get an execution of an Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetSample.ts index 1fac52bf1364..45a99cf4c699 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllExecutionsSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllExecutionsSample.ts index 352d507bb2a0..e67eb3bdc214 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllExecutionsSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllExecutionsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of executions of an Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllSample.ts index bc6b8263697b..f29f33fc1804 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListAllSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Experiment resources in a subscription. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListSample.ts index a18cd79f1366..5105358feb46 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsListSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Experiment resources in a resource group. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsStartSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsStartSample.ts index 9a21d046d472..388a6f5abba1 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsStartSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsStartSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Start a Experiment resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsUpdateSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsUpdateSample.ts index 273e6f714ad3..26234461b0f4 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/experimentsUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ExperimentUpdate, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to The operation to update an experiment. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/operationStatusesGetSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/operationStatusesGetSample.ts index 24cdf86c4006..82aa5a5074fb 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/operationStatusesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/operationStatusesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the status of a long running azure asynchronous operation. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesGetSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesGetSample.ts index 6a4692e39e79..0cb3bbd1fced 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesGetSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Target Type resources for given location. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesListSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesListSample.ts index b29c7c2be270..1d12d3ca89ef 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesListSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetTypesListSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Target Type resources for given location. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsCreateOrUpdateSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsCreateOrUpdateSample.ts index 5fa1524a1d5c..72a1cdef49f8 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsCreateOrUpdateSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Target, ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a Target resource that extends a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsDeleteSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsDeleteSample.ts index 364a53bf9f0e..ac1fa4e133f2 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsDeleteSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a Target resource that extends a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsGetSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsGetSample.ts index 82ecb31268fa..5c7d323d7392 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsGetSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ChaosManagementClient } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a Target resource that extends a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsListSample.ts b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsListSample.ts index 24e69aa2d109..570fa92aa6ad 100644 --- a/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsListSample.ts +++ b/sdk/chaos/arm-chaos/samples/v1/typescript/src/targetsListSample.ts @@ -13,9 +13,7 @@ import { ChaosManagementClient, } from "@azure/arm-chaos"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of Target resources that extend a tracked regional resource. diff --git a/sdk/chaos/arm-chaos/src/chaosManagementClient.ts b/sdk/chaos/arm-chaos/src/chaosManagementClient.ts index 2584392268e7..30746ee5d672 100644 --- a/sdk/chaos/arm-chaos/src/chaosManagementClient.ts +++ b/sdk/chaos/arm-chaos/src/chaosManagementClient.ts @@ -22,7 +22,7 @@ import { OperationsImpl, TargetTypesImpl, TargetsImpl, -} from "./operations"; +} from "./operations/index.js"; import { Capabilities, CapabilityTypes, @@ -31,8 +31,8 @@ import { Operations, TargetTypes, Targets, -} from "./operationsInterfaces"; -import { ChaosManagementClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { ChaosManagementClientOptionalParams } from "./models/index.js"; export class ChaosManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/chaos/arm-chaos/src/index.ts b/sdk/chaos/arm-chaos/src/index.ts index 2e3d61dbe5b3..e55698f6efba 100644 --- a/sdk/chaos/arm-chaos/src/index.ts +++ b/sdk/chaos/arm-chaos/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { ChaosManagementClient } from "./chaosManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { ChaosManagementClient } from "./chaosManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/chaos/arm-chaos/src/models/parameters.ts b/sdk/chaos/arm-chaos/src/models/parameters.ts index 4cf170278934..9e1ca8d33639 100644 --- a/sdk/chaos/arm-chaos/src/models/parameters.ts +++ b/sdk/chaos/arm-chaos/src/models/parameters.ts @@ -16,7 +16,7 @@ import { Experiment as ExperimentMapper, ExperimentUpdate as ExperimentUpdateMapper, Target as TargetMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/chaos/arm-chaos/src/operations/capabilities.ts b/sdk/chaos/arm-chaos/src/operations/capabilities.ts index ae8f4d4affd3..8b3b6819caa9 100644 --- a/sdk/chaos/arm-chaos/src/operations/capabilities.ts +++ b/sdk/chaos/arm-chaos/src/operations/capabilities.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Capabilities } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Capabilities } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { Capability, CapabilitiesListNextOptionalParams, @@ -24,7 +24,7 @@ import { CapabilitiesCreateOrUpdateOptionalParams, CapabilitiesCreateOrUpdateResponse, CapabilitiesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Capabilities operations. */ diff --git a/sdk/chaos/arm-chaos/src/operations/capabilityTypes.ts b/sdk/chaos/arm-chaos/src/operations/capabilityTypes.ts index ca6f6b979cd5..4db9c01d5285 100644 --- a/sdk/chaos/arm-chaos/src/operations/capabilityTypes.ts +++ b/sdk/chaos/arm-chaos/src/operations/capabilityTypes.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CapabilityTypes } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { CapabilityTypes } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { CapabilityType, CapabilityTypesListNextOptionalParams, @@ -21,7 +21,7 @@ import { CapabilityTypesGetOptionalParams, CapabilityTypesGetResponse, CapabilityTypesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CapabilityTypes operations. */ diff --git a/sdk/chaos/arm-chaos/src/operations/experiments.ts b/sdk/chaos/arm-chaos/src/operations/experiments.ts index 06909a5c6de5..3e6cb99ca9c4 100644 --- a/sdk/chaos/arm-chaos/src/operations/experiments.ts +++ b/sdk/chaos/arm-chaos/src/operations/experiments.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Experiments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Experiments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Experiment, ExperimentsListAllNextOptionalParams, @@ -48,7 +48,7 @@ import { ExperimentsListAllNextResponse, ExperimentsListNextResponse, ExperimentsListAllExecutionsNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Experiments operations. */ diff --git a/sdk/chaos/arm-chaos/src/operations/index.ts b/sdk/chaos/arm-chaos/src/operations/index.ts index a8dac204e1bb..ba27ecea12f2 100644 --- a/sdk/chaos/arm-chaos/src/operations/index.ts +++ b/sdk/chaos/arm-chaos/src/operations/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./capabilities"; -export * from "./capabilityTypes"; -export * from "./experiments"; -export * from "./operationStatuses"; -export * from "./operations"; -export * from "./targetTypes"; -export * from "./targets"; +export * from "./capabilities.js"; +export * from "./capabilityTypes.js"; +export * from "./experiments.js"; +export * from "./operationStatuses.js"; +export * from "./operations.js"; +export * from "./targetTypes.js"; +export * from "./targets.js"; diff --git a/sdk/chaos/arm-chaos/src/operations/operationStatuses.ts b/sdk/chaos/arm-chaos/src/operations/operationStatuses.ts index 1c562cee2da1..d272bfc537fa 100644 --- a/sdk/chaos/arm-chaos/src/operations/operationStatuses.ts +++ b/sdk/chaos/arm-chaos/src/operations/operationStatuses.ts @@ -6,15 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { OperationStatuses } from "../operationsInterfaces"; +import { OperationStatuses } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { OperationStatusesGetOptionalParams, OperationStatusesGetResponse, -} from "../models"; +} from "../models/index.js"; /** Class containing OperationStatuses operations. */ export class OperationStatusesImpl implements OperationStatuses { diff --git a/sdk/chaos/arm-chaos/src/operations/operations.ts b/sdk/chaos/arm-chaos/src/operations/operations.ts index 091356fee0e5..e0c3f5e6caaa 100644 --- a/sdk/chaos/arm-chaos/src/operations/operations.ts +++ b/sdk/chaos/arm-chaos/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 { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { Operation, OperationsListAllNextOptionalParams, OperationsListAllOptionalParams, OperationsListAllResponse, OperationsListAllNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/chaos/arm-chaos/src/operations/targetTypes.ts b/sdk/chaos/arm-chaos/src/operations/targetTypes.ts index 9f241e48a2eb..68638640f8a1 100644 --- a/sdk/chaos/arm-chaos/src/operations/targetTypes.ts +++ b/sdk/chaos/arm-chaos/src/operations/targetTypes.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TargetTypes } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { TargetTypes } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { TargetType, TargetTypesListNextOptionalParams, @@ -21,7 +21,7 @@ import { TargetTypesGetOptionalParams, TargetTypesGetResponse, TargetTypesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing TargetTypes operations. */ diff --git a/sdk/chaos/arm-chaos/src/operations/targets.ts b/sdk/chaos/arm-chaos/src/operations/targets.ts index 1d84dc1cf961..50fb6d185945 100644 --- a/sdk/chaos/arm-chaos/src/operations/targets.ts +++ b/sdk/chaos/arm-chaos/src/operations/targets.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Targets } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Targets } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ChaosManagementClient } from "../chaosManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { ChaosManagementClient } from "../chaosManagementClient.js"; import { Target, TargetsListNextOptionalParams, @@ -24,7 +24,7 @@ import { TargetsCreateOrUpdateOptionalParams, TargetsCreateOrUpdateResponse, TargetsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Targets operations. */ diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilities.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilities.ts index fc9dc09207d8..60ca061944d5 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilities.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilities.ts @@ -15,7 +15,7 @@ import { CapabilitiesDeleteOptionalParams, CapabilitiesCreateOrUpdateOptionalParams, CapabilitiesCreateOrUpdateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Capabilities. */ diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilityTypes.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilityTypes.ts index 330f070da1d4..189b1405722d 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilityTypes.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/capabilityTypes.ts @@ -12,7 +12,7 @@ import { CapabilityTypesListOptionalParams, CapabilityTypesGetOptionalParams, CapabilityTypesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CapabilityTypes. */ diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/experiments.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/experiments.ts index 3b717738b43b..e5dcff837d86 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/experiments.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/experiments.ts @@ -28,7 +28,7 @@ import { ExperimentsGetExecutionResponse, ExperimentsExecutionDetailsOptionalParams, ExperimentsExecutionDetailsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Experiments. */ diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/index.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/index.ts index a8dac204e1bb..ba27ecea12f2 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/index.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/index.ts @@ -6,10 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./capabilities"; -export * from "./capabilityTypes"; -export * from "./experiments"; -export * from "./operationStatuses"; -export * from "./operations"; -export * from "./targetTypes"; -export * from "./targets"; +export * from "./capabilities.js"; +export * from "./capabilityTypes.js"; +export * from "./experiments.js"; +export * from "./operationStatuses.js"; +export * from "./operations.js"; +export * from "./targetTypes.js"; +export * from "./targets.js"; diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/operationStatuses.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/operationStatuses.ts index 307733f15b49..6344c8c35839 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/operationStatuses.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/operationStatuses.ts @@ -9,7 +9,7 @@ import { OperationStatusesGetOptionalParams, OperationStatusesGetResponse, -} from "../models"; +} from "../models/index.js"; /** Interface representing a OperationStatuses. */ export interface OperationStatuses { diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/operations.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/operations.ts index 6894aae3c495..c1faac7d168d 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/operations.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListAllOptionalParams } from "../models"; +import { Operation, OperationsListAllOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/targetTypes.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/targetTypes.ts index 652bdeb9f03c..a2dc0fc48867 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/targetTypes.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/targetTypes.ts @@ -12,7 +12,7 @@ import { TargetTypesListOptionalParams, TargetTypesGetOptionalParams, TargetTypesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a TargetTypes. */ diff --git a/sdk/chaos/arm-chaos/src/operationsInterfaces/targets.ts b/sdk/chaos/arm-chaos/src/operationsInterfaces/targets.ts index d58ad7628e0a..89e65eba5e32 100644 --- a/sdk/chaos/arm-chaos/src/operationsInterfaces/targets.ts +++ b/sdk/chaos/arm-chaos/src/operationsInterfaces/targets.ts @@ -15,7 +15,7 @@ import { TargetsDeleteOptionalParams, TargetsCreateOrUpdateOptionalParams, TargetsCreateOrUpdateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Targets. */ diff --git a/sdk/chaos/arm-chaos/test/chaos_examples.spec.ts b/sdk/chaos/arm-chaos/test/chaos_examples.spec.ts index 8f7688163aaf..b2fa76a125cf 100644 --- a/sdk/chaos/arm-chaos/test/chaos_examples.spec.ts +++ b/sdk/chaos/arm-chaos/test/chaos_examples.spec.ts @@ -10,14 +10,12 @@ 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 { ChaosManagementClient } from "../src/chaosManagementClient"; +import { ChaosManagementClient } from "../src/chaosManagementClient.js"; import { CosmosDBManagementClient } from "@azure/arm-cosmosdb" +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -52,8 +50,8 @@ describe("Chaos test", () => { let parentResourceType: string; let targetName: 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 @@ -114,6 +112,7 @@ describe("Chaos test", () => { } } ); + assert.equal(res.name, targetName); }); it("experiment create test", async function () { @@ -197,7 +196,7 @@ describe("Chaos test", () => { it("experiment delete test", async function () { const resArray = new Array(); - const res = await client.experiments.beginDeleteAndWait(resourceGroup, experimentName, testPollingOptions) + await client.experiments.beginDeleteAndWait(resourceGroup, experimentName, testPollingOptions) for await (let item of client.experiments.list(resourceGroup)) { resArray.push(item); } @@ -206,7 +205,7 @@ describe("Chaos test", () => { it("target delete test", async function () { const resArray = new Array(); - const res = await client.targets.delete(resourceGroup, + await client.targets.delete(resourceGroup, parentProviderNamespace, parentResourceType, cosmosdbName, @@ -222,10 +221,10 @@ describe("Chaos test", () => { it("chaos dependence delete test", async function () { const resArray = new Array(); - const res = await cos_client.databaseAccounts.beginDeleteAndWait(resourceGroup, cosmosdbName, testPollingOptions) + await cos_client.databaseAccounts.beginDeleteAndWait(resourceGroup, cosmosdbName, testPollingOptions) for await (let item of cos_client.databaseAccounts.listByResourceGroup(resourceGroup)) { resArray.push(item); } assert.equal(resArray.length, 0); - }).timeout(3600000); + }); }); diff --git a/sdk/chaos/arm-chaos/tsconfig.browser.config.json b/sdk/chaos/arm-chaos/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/chaos/arm-chaos/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/chaos/arm-chaos/tsconfig.json b/sdk/chaos/arm-chaos/tsconfig.json index cb248642ee7c..19ceb382b521 100644 --- a/sdk/chaos/arm-chaos/tsconfig.json +++ b/sdk/chaos/arm-chaos/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-chaos": [ - "./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/chaos/arm-chaos/tsconfig.samples.json b/sdk/chaos/arm-chaos/tsconfig.samples.json new file mode 100644 index 000000000000..dff2f03dc9c2 --- /dev/null +++ b/sdk/chaos/arm-chaos/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-chaos": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/chaos/arm-chaos/tsconfig.src.json b/sdk/chaos/arm-chaos/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/chaos/arm-chaos/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/chaos/arm-chaos/tsconfig.test.json b/sdk/chaos/arm-chaos/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/chaos/arm-chaos/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/chaos/arm-chaos/vitest.browser.config.ts b/sdk/chaos/arm-chaos/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/chaos/arm-chaos/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/chaos/arm-chaos/vitest.config.ts b/sdk/chaos/arm-chaos/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/chaos/arm-chaos/vitest.config.ts @@ -0,0 +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 mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/chaos/arm-chaos/vitest.esm.config.ts b/sdk/chaos/arm-chaos/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/chaos/arm-chaos/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 +); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/api-extractor.json b/sdk/cognitiveservices/arm-cognitiveservices/api-extractor.json index 486163c73c91..061f85d45096 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/api-extractor.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/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-cognitiveservices.d.ts" + "publicTrimmedFilePath": "dist/arm-cognitiveservices.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/package.json b/sdk/cognitiveservices/arm-cognitiveservices/package.json index e6f913da7cc1..29cff9a9979f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/package.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/package.json @@ -8,11 +8,11 @@ "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^2.1.2", - "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.6.0", + "@azure/core-client": "^1.7.0", + "@azure/core-lro": "^2.5.4", + "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.14.0", "tslib": "^2.2.0" }, @@ -24,23 +24,23 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-cognitiveservices.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "typescript": "~5.7.2", - "dotenv": "^16.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.2.1", - "@azure-tools/test-recorder": "^3.0.0", - "@azure-tools/test-credential": "^1.1.0", - "mocha": "^10.0.0", - "@types/mocha": "^10.0.0", - "tsx": "^4.7.1", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", "@types/node": "^18.0.0", - "ts-node": "^10.0.0" + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", + "dotenv": "^16.0.0", + "playwright": "^1.49.1", + "tsx": "^4.7.1", + "typescript": "~5.7.2", + "vitest": "^2.1.8" }, "repository": { "type": "git", @@ -50,46 +50,36 @@ "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", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "prepack": "npm run build", - "pack": "npm pack 2>&1", - "extract-api": "dev-tool run extract-api", - "lint": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "build:node": "echo skipped", + "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:test": "echo skipped", + "build:node": "echo skipped", "build:samples": "echo skipped.", + "build:test": "echo skipped", "check-format": "echo skipped", + "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", + "extract-api": "dev-tool run extract-api", "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: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", + "prepack": "npm run build", "test": "npm run integration-test", - "test:node": "echo skipped", "test:browser": "echo skipped", + "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", - "integration-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -110,5 +100,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-cognitiveservices?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", + "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" + } + } } } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts index 855b9df8b2c1..9e160ad48877 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsCreateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts index 59e4b1e72fd6..b48e31f44d45 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts index ac95f4b8b6c4..d8ee98168f84 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts index d745c5549342..9f6742a43814 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts index 4008a5a30e06..642a8e5c5fb4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the account keys for the specified Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts index fb1c3cf7fcfc..fa4cebb92df8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListModelsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List available Models for the requested Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts index 459ed193ce70..294081816fb5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts index 589e04f843ec..42d9d22527f5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List available SKUs for the requested Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts index 029ea5222299..2a8cfc698c02 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsListUsagesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get usages for the requested Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts index 19aad9824fd6..bc07a5a1c420 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsRegenerateKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates the specified account key for the specified Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts index 57b80519420d..b06bee942ef8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/accountsUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates a Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts index eb574b9cecee..bc7435ea65e7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/calculateModelCapacitySample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Model capacity calculator. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts index 7485d605c90c..56d345f452ba 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkDomainAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Check whether a domain is available. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts index 636fffb9777f..eeec32551491 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/checkSkuAvailabilitySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Check available SKUs. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts index dbfb5dfd8893..1adf85b81835 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateAssociationSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update the association of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts index 2f47d0db7c64..3360a8ba42b8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdatePlanSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts index a6c6085da394..9313fa143bce 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 commitmentPlans associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts index 6b3597d80684..65cd865a62d7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteAssociationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the association of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts index 03b444a86f59..fc2ac6b0717c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeletePlanSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a Cognitive Services commitment plan from the resource group. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts index 132fab570c32..9077ecb7ac10 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified commitmentPlan associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts index 3f879364a3be..6ef74408e8be 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetAssociationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the association of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts index fbb8d8b570d7..0c5c0bab7e75 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetPlanSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a Cognitive Services commitment plan specified by the parameters. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts index a26c94a48cdd..2a759b6cb57f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified commitmentPlans associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts index fd42f859d793..bf718e3c19b7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListAssociationsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the associations of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts index 202ec83ffc21..8334740ec5de 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts index d27f76c6b04f..ed09900f4fec 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListPlansBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts index 991f990c845d..b82aa90dcb8b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the commitmentPlans associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts index 92e793e64378..17e54a3a32bb 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentPlansUpdatePlanSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts index 0b0886e688d0..bbddb37c5e3f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/commitmentTiersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Commitment Tiers. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts index 6cfcd068d7e5..d1f4b17a7392 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates the specified Defender for AI setting. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts index c6e939608b9c..378adb69de17 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Defender for AI setting by name. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts index db6f0824c430..bd1c45dbee56 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Defender for AI settings. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts index 52ae8d5f9066..80a9135d76ef 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/defenderForAiSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specified Defender for AI setting. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts index 92d899b308da..1a5f6583b5e7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts index 8f23a5684d87..e0a8520eba4c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts index 198857f8a548..80622fe1b381 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deletedAccountsPurgeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts index 40d90a634ed2..91fa37603695 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts index 935695b4acc1..2bb99aff5c9b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified deployment associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts index eab4e40bffc6..8de0d4d068a5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts index 821645e90a95..50cf4bca6a7b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts index f0f91473a804..2f81ac5b9076 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsListSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the specified deployments skus associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts index 1218362d64e5..a00892cb6b23 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/deploymentsUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update specified deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts index a343b56c5a98..b41d35c153f3 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 encryptionScope associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts index 0a213ace78fc..c0583cf9e04f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified encryptionScope associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts index e595b6dc9478..c363518e3d58 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified EncryptionScope associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts index 014cb9a2c0f9..674987c06299 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/encryptionScopesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts index 1c509fedbeb6..412f2608683d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/locationBasedModelCapacitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Location Based ModelCapacities. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts index 832a8a581a8d..dbba3567665c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelCapacitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List ModelCapacities. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts index da7e3e32a14d..9a4e1c212804 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/modelsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Models. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts index 6ae41f077c9c..19549cc7131f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified NSP configurations for an account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts index 52153b872821..693ce7699352 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a list of NSP configurations for an account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts index 51576bfd7239..c78fc4b62645 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reconcile the NSP configuration for an account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts index 8448aed6f43c..ca3a467bc2e2 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the available Cognitive Services account operations. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts index 0197636331af..64bf0304bc26 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts index dcae86191d76..06cb8e297070 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts index a5b22733b314..fee3b32d804f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts index 80cda9ba650e..8f183af4f3cf 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateEndpointConnectionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private endpoint connections associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts index 0597eff94f24..aaba96dc2b7d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/privateLinkResourcesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts index 18d0a657fe9f..69008730e452 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchAddSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Batch operation to add blocklist items. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts index 27571a9a67e4..2410472b791e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsBatchDeleteSample.ts @@ -12,9 +12,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Batch operation to delete blocklist items. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts index af5b9ec0e447..5e0c1e02e780 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 blocklist item associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts index 10794c79da9d..c32ad9e4f942 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified blocklist Item associated with the custom blocklist. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts index 120dc9942b5c..359aaeb4e757 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified custom blocklist Item associated with the custom blocklist. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts index 4bb0ceed7e7a..c28e15b9d5d0 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistItemsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the blocklist items associated with the custom blocklist. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts index a24461ee35a7..7d932b57b18c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 blocklist associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts index ab12f0363f6a..35ddde4fb032 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified custom blocklist associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts index 57f9f4938b1e..014af89aea5a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified custom blocklist associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts index a042551e8b40..2d51dde29993 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiBlocklistsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the custom blocklists associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts index 7b3bfb5a67cf..6dc3257f99cb 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Content Filters by Name. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts index 830ecb5fc543..9b8791bdeb34 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiContentFiltersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Content Filters types. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts index e79c4eedca54..6dbeb7ac3181 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 Content Filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts index d1f0e5f07444..11c5b175b560 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Content Filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts index a96360a06b9b..018faee5f51b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Content Filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts index c0d104fee4be..1cf84aaaa14c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/raiPoliciesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts index 5d7b3e45e81a..b35382bae349 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/resourceSkusListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts index bb1b0d4b93af..3f96357ac0b0 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples-dev/usagesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get usages for the requested subscription diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts index 855b9df8b2c1..9e160ad48877 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsCreateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts index 59e4b1e72fd6..b48e31f44d45 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts index ac95f4b8b6c4..d8ee98168f84 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts index d745c5549342..9f6742a43814 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts index 4008a5a30e06..642a8e5c5fb4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the account keys for the specified Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts index fb1c3cf7fcfc..fa4cebb92df8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListModelsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List available Models for the requested Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts index 459ed193ce70..294081816fb5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts index 589e04f843ec..42d9d22527f5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List available SKUs for the requested Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts index 029ea5222299..2a8cfc698c02 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsListUsagesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get usages for the requested Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts index 19aad9824fd6..bc07a5a1c420 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsRegenerateKeySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerates the specified account key for the specified Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts index 57b80519420d..b06bee942ef8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/accountsUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates a Cognitive Services account diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts index eb574b9cecee..bc7435ea65e7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/calculateModelCapacitySample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Model capacity calculator. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts index 7485d605c90c..56d345f452ba 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkDomainAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Check whether a domain is available. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts index 636fffb9777f..eeec32551491 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/checkSkuAvailabilitySample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Check available SKUs. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts index dbfb5dfd8893..1adf85b81835 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateAssociationSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update the association of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts index 2f47d0db7c64..3360a8ba42b8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdatePlanSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts index a6c6085da394..9313fa143bce 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 commitmentPlans associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts index 6b3597d80684..65cd865a62d7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteAssociationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the association of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts index 03b444a86f59..fc2ac6b0717c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeletePlanSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a Cognitive Services commitment plan from the resource group. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts index 132fab570c32..9077ecb7ac10 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified commitmentPlan associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts index 3f879364a3be..6ef74408e8be 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetAssociationSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the association of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts index fbb8d8b570d7..0c5c0bab7e75 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetPlanSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a Cognitive Services commitment plan specified by the parameters. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts index a26c94a48cdd..2a759b6cb57f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified commitmentPlans associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts index fd42f859d793..bf718e3c19b7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListAssociationsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the associations of the Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts index 202ec83ffc21..8334740ec5de 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts index d27f76c6b04f..ed09900f4fec 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListPlansBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts index 991f990c845d..b82aa90dcb8b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the commitmentPlans associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts index 92e793e64378..17e54a3a32bb 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentPlansUpdatePlanSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create Cognitive Services commitment plan. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts index 0b0886e688d0..bbddb37c5e3f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/commitmentTiersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Commitment Tiers. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts index 6cfcd068d7e5..d1f4b17a7392 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates or Updates the specified Defender for AI setting. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts index c6e939608b9c..378adb69de17 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Defender for AI setting by name. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts index db6f0824c430..bd1c45dbee56 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the Defender for AI settings. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts index 52ae8d5f9066..80a9135d76ef 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/defenderForAiSettingsUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates the specified Defender for AI setting. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts index 92d899b308da..1a5f6583b5e7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Returns a Cognitive Services account specified by the parameters. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts index 8f23a5684d87..e0a8520eba4c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts index 198857f8a548..80622fe1b381 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deletedAccountsPurgeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a Cognitive Services account from the resource group. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts index 40d90a634ed2..91fa37603695 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts index 935695b4acc1..2bb99aff5c9b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified deployment associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts index eab4e40bffc6..8de0d4d068a5 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts index 821645e90a95..50cf4bca6a7b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts index f0f91473a804..2f81ac5b9076 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsListSkusSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists the specified deployments skus associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts index 1218362d64e5..a00892cb6b23 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/deploymentsUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update specified deployments associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts index a343b56c5a98..b41d35c153f3 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 encryptionScope associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts index 0a213ace78fc..c0583cf9e04f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified encryptionScope associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts index e595b6dc9478..c363518e3d58 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified EncryptionScope associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts index 014cb9a2c0f9..674987c06299 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/encryptionScopesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts index 1c509fedbeb6..412f2608683d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/locationBasedModelCapacitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Location Based ModelCapacities. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts index 832a8a581a8d..dbba3567665c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelCapacitiesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List ModelCapacities. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts index da7e3e32a14d..9a4e1c212804 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/modelsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Models. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts index 6ae41f077c9c..19549cc7131f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified NSP configurations for an account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts index 52153b872821..693ce7699352 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a list of NSP configurations for an account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts index 51576bfd7239..c78fc4b62645 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reconcile the NSP configuration for an account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts index 8448aed6f43c..ca3a467bc2e2 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Lists all the available Cognitive Services account operations. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts index 0197636331af..64bf0304bc26 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts index dcae86191d76..06cb8e297070 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts index a5b22733b314..fee3b32d804f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts index 80cda9ba650e..8f183af4f3cf 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateEndpointConnectionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the private endpoint connections associated with the Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts index 0597eff94f24..aaba96dc2b7d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/privateLinkResourcesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; 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 Cognitive Services account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts index 18d0a657fe9f..69008730e452 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchAddSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Batch operation to add blocklist items. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts index 27571a9a67e4..2410472b791e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsBatchDeleteSample.ts @@ -12,9 +12,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Batch operation to delete blocklist items. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts index af5b9ec0e447..5e0c1e02e780 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 blocklist item associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts index 10794c79da9d..c32ad9e4f942 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified blocklist Item associated with the custom blocklist. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts index 120dc9942b5c..359aaeb4e757 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified custom blocklist Item associated with the custom blocklist. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts index 4bb0ceed7e7a..c28e15b9d5d0 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistItemsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the blocklist items associated with the custom blocklist. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts index a24461ee35a7..7d932b57b18c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 blocklist associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts index ab12f0363f6a..35ddde4fb032 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified custom blocklist associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts index 57f9f4938b1e..014af89aea5a 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified custom blocklist associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts index a042551e8b40..2d51dde29993 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiBlocklistsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the custom blocklists associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts index 7b3bfb5a67cf..6dc3257f99cb 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get Content Filters by Name. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts index 830ecb5fc543..9b8791bdeb34 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiContentFiltersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List Content Filters types. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts index e79c4eedca54..6dbeb7ac3181 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CognitiveServicesManagementClient, } from "@azure/arm-cognitiveservices"; 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 Content Filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts index d1f0e5f07444..11c5b175b560 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes the specified Content Filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts index a96360a06b9b..018faee5f51b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the specified Content Filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts index c0d104fee4be..1cf84aaaa14c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/raiPoliciesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the content filters associated with the Azure OpenAI account. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts index 5d7b3e45e81a..b35382bae349 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/resourceSkusListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets the list of Microsoft.CognitiveServices SKUs available for your Subscription. diff --git a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts index bb1b0d4b93af..3f96357ac0b0 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/samples/v7/typescript/src/usagesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CognitiveServicesManagementClient } from "@azure/arm-cognitiveservices"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get usages for the requested subscription diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts index e55901ff1939..9d5de878383e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/cognitiveServicesManagementClient.ts @@ -35,7 +35,7 @@ import { RaiContentFiltersImpl, NetworkSecurityPerimeterConfigurationsImpl, DefenderForAISettingsImpl, -} from "./operations"; +} from "./operations/index.js"; import { Accounts, DeletedAccounts, @@ -57,9 +57,9 @@ import { RaiContentFilters, NetworkSecurityPerimeterConfigurations, DefenderForAISettings, -} 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 { CognitiveServicesManagementClientOptionalParams, CheckSkuAvailabilityOptionalParams, @@ -68,7 +68,7 @@ import { CheckDomainAvailabilityResponse, CalculateModelCapacityOptionalParams, CalculateModelCapacityResponse, -} from "./models"; +} from "./models/index.js"; export class CognitiveServicesManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/index.ts index 8917447b6e10..d3a09058608b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CognitiveServicesManagementClient } from "./cognitiveServicesManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CognitiveServicesManagementClient } from "./cognitiveServicesManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts index fd2cd53fa630..dd69903ec35d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/models/parameters.ts @@ -27,7 +27,7 @@ import { RaiBlocklist as RaiBlocklistMapper, RaiBlocklistItem as RaiBlocklistItemMapper, DefenderForAISetting as DefenderForAISettingMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts index 2ccda665f87b..6f7a466ea35d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/accounts.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Accounts } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Accounts } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Account, AccountsListByResourceGroupNextOptionalParams, @@ -50,7 +50,7 @@ import { AccountsListByResourceGroupNextResponse, AccountsListNextResponse, AccountsListModelsNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Accounts operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts index c4152401f592..822eeedbeb91 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentPlans.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CommitmentPlans } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { CommitmentPlans } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { CommitmentPlan, CommitmentPlansListNextOptionalParams, @@ -56,7 +56,7 @@ import { CommitmentPlansListPlansByResourceGroupNextResponse, CommitmentPlansListPlansBySubscriptionNextResponse, CommitmentPlansListAssociationsNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CommitmentPlans operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts index c160c1af803d..2ff81f474f25 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/commitmentTiers.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CommitmentTiers } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { CommitmentTiers } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { CommitmentTier, CommitmentTiersListNextOptionalParams, CommitmentTiersListOptionalParams, CommitmentTiersListResponse, CommitmentTiersListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CommitmentTiers operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts index fd228c3e325d..5a373435e365 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/defenderForAISettings.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DefenderForAISettings } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { DefenderForAISettings } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { DefenderForAISetting, DefenderForAISettingsListNextOptionalParams, @@ -25,7 +25,7 @@ import { DefenderForAISettingsUpdateOptionalParams, DefenderForAISettingsUpdateResponse, DefenderForAISettingsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DefenderForAISettings operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts index 99baec5a3943..58e2a1995d3b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deletedAccounts.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DeletedAccounts } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { DeletedAccounts } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Account, DeletedAccountsListNextOptionalParams, @@ -28,7 +28,7 @@ import { DeletedAccountsGetResponse, DeletedAccountsPurgeOptionalParams, DeletedAccountsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DeletedAccounts operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts index f92e27b14e75..8ba1ecdfe42c 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/deployments.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Deployments } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Deployments } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Deployment, DeploymentsListNextOptionalParams, @@ -38,7 +38,7 @@ import { DeploymentsDeleteOptionalParams, DeploymentsListNextResponse, DeploymentsListSkusNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Deployments operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts index 88aa5d1dcc94..12eaed7b3dd7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/encryptionScopes.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { EncryptionScopes } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { EncryptionScopes } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EncryptionScope, EncryptionScopesListNextOptionalParams, @@ -31,7 +31,7 @@ import { EncryptionScopesDeleteOptionalParams, EncryptionScopesDeleteResponse, EncryptionScopesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing EncryptionScopes operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts index 17996d460adc..7349e4f4540e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/index.ts @@ -6,23 +6,23 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./accounts"; -export * from "./deletedAccounts"; -export * from "./resourceSkus"; -export * from "./usages"; -export * from "./operations"; -export * from "./commitmentTiers"; -export * from "./models"; -export * from "./locationBasedModelCapacities"; -export * from "./modelCapacities"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./deployments"; -export * from "./commitmentPlans"; -export * from "./encryptionScopes"; -export * from "./raiPolicies"; -export * from "./raiBlocklists"; -export * from "./raiBlocklistItems"; -export * from "./raiContentFilters"; -export * from "./networkSecurityPerimeterConfigurations"; -export * from "./defenderForAISettings"; +export * from "./accounts.js"; +export * from "./deletedAccounts.js"; +export * from "./resourceSkus.js"; +export * from "./usages.js"; +export * from "./operations.js"; +export * from "./commitmentTiers.js"; +export * from "./models.js"; +export * from "./locationBasedModelCapacities.js"; +export * from "./modelCapacities.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./deployments.js"; +export * from "./commitmentPlans.js"; +export * from "./encryptionScopes.js"; +export * from "./raiPolicies.js"; +export * from "./raiBlocklists.js"; +export * from "./raiBlocklistItems.js"; +export * from "./raiContentFilters.js"; +export * from "./networkSecurityPerimeterConfigurations.js"; +export * from "./defenderForAISettings.js"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts index 9479cc3431bb..dd2abea56363 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/locationBasedModelCapacities.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { LocationBasedModelCapacities } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { LocationBasedModelCapacities } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { ModelCapacityListResultValueItem, LocationBasedModelCapacitiesListNextOptionalParams, LocationBasedModelCapacitiesListOptionalParams, LocationBasedModelCapacitiesListResponse, LocationBasedModelCapacitiesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing LocationBasedModelCapacities operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts index da1e15efc500..39e04814ac29 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/modelCapacities.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ModelCapacities } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ModelCapacities } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { ModelCapacityListResultValueItem, ModelCapacitiesListNextOptionalParams, ModelCapacitiesListOptionalParams, ModelCapacitiesListResponse, ModelCapacitiesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ModelCapacities operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts index 5b60bc519681..5af9bdaa1335 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/models.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Models } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Models } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { Model, ModelsListNextOptionalParams, ModelsListOptionalParams, ModelsListResponse, ModelsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Models operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts index eac730db0ee3..b1c4308d5b16 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/networkSecurityPerimeterConfigurations.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { NetworkSecurityPerimeterConfiguration, NetworkSecurityPerimeterConfigurationsListNextOptionalParams, @@ -29,7 +29,7 @@ import { NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, NetworkSecurityPerimeterConfigurationsReconcileResponse, NetworkSecurityPerimeterConfigurationsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing NetworkSecurityPerimeterConfigurations operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts index 8cd44eed2fa8..5c5f9fe910e6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/operations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/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 { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts index e96e65a2a562..6f2530a89189 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateEndpointConnections.ts @@ -6,17 +6,17 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -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 { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PrivateEndpointConnectionsListOptionalParams, PrivateEndpointConnectionsListResponse, @@ -26,7 +26,7 @@ import { PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Class containing PrivateEndpointConnections operations. */ export class PrivateEndpointConnectionsImpl diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts index 3e95afb14214..4f6275797b15 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/privateLinkResources.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/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 { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { PrivateLinkResourcesListOptionalParams, PrivateLinkResourcesListResponse, -} from "../models"; +} from "../models/index.js"; /** Class containing PrivateLinkResources operations. */ export class PrivateLinkResourcesImpl implements PrivateLinkResources { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts index 276494b3f577..cdd683b735ac 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklistItems.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RaiBlocklistItems } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RaiBlocklistItems } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { RaiBlocklistItem, RaiBlocklistItemsListNextOptionalParams, @@ -35,7 +35,7 @@ import { RaiBlocklistItemsBatchAddResponse, RaiBlocklistItemsBatchDeleteOptionalParams, RaiBlocklistItemsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RaiBlocklistItems operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts index 07b9614fa442..eb5700effdad 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiBlocklists.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RaiBlocklists } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RaiBlocklists } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { RaiBlocklist, RaiBlocklistsListNextOptionalParams, @@ -31,7 +31,7 @@ import { RaiBlocklistsDeleteOptionalParams, RaiBlocklistsDeleteResponse, RaiBlocklistsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RaiBlocklists operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts index 10ff7e1d8bfc..9148261095a1 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiContentFilters.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RaiContentFilters } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RaiContentFilters } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { RaiContentFilter, RaiContentFiltersListNextOptionalParams, @@ -21,7 +21,7 @@ import { RaiContentFiltersGetOptionalParams, RaiContentFiltersGetResponse, RaiContentFiltersListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RaiContentFilters operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts index 6925efc5ea42..c802be4be4b7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/raiPolicies.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { RaiPolicies } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { RaiPolicies } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { RaiPolicy, RaiPoliciesListNextOptionalParams, @@ -31,7 +31,7 @@ import { RaiPoliciesDeleteOptionalParams, RaiPoliciesDeleteResponse, RaiPoliciesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing RaiPolicies operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts index 7bd85291ad33..6a2fb31ab3e1 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/resourceSkus.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ResourceSkus } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ResourceSkus } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { ResourceSku, ResourceSkusListNextOptionalParams, ResourceSkusListOptionalParams, ResourceSkusListResponse, ResourceSkusListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ResourceSkus operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts index 0b9d0b08327c..ac56c79ed89b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operations/usages.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Usages } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Usages } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CognitiveServicesManagementClient } from "../cognitiveServicesManagementClient.js"; import { Usage, UsagesListNextOptionalParams, UsagesListOptionalParams, UsagesListResponse, UsagesListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Usages operations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts index a4b971be0ed6..0026b7cf1fe4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/accounts.ts @@ -30,7 +30,7 @@ import { AccountsListSkusResponse, AccountsListUsagesOptionalParams, AccountsListUsagesResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Accounts. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts index 95e8757ac336..b11a3228020f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentPlans.ts @@ -33,7 +33,7 @@ import { CommitmentPlansCreateOrUpdateAssociationOptionalParams, CommitmentPlansCreateOrUpdateAssociationResponse, CommitmentPlansDeleteAssociationOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CommitmentPlans. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts index 0fd1639b5160..1b424a3dabb7 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/commitmentTiers.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { CommitmentTier, CommitmentTiersListOptionalParams } from "../models"; +import { CommitmentTier, CommitmentTiersListOptionalParams } from "../models/index.js"; /// /** Interface representing a CommitmentTiers. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts index a6d4ae17e7eb..9b004cacc434 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/defenderForAISettings.ts @@ -16,7 +16,7 @@ import { DefenderForAISettingsCreateOrUpdateResponse, DefenderForAISettingsUpdateOptionalParams, DefenderForAISettingsUpdateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DefenderForAISettings. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts index 95c9ba43af09..1567e28b9129 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deletedAccounts.ts @@ -14,7 +14,7 @@ import { DeletedAccountsGetOptionalParams, DeletedAccountsGetResponse, DeletedAccountsPurgeOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DeletedAccounts. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts index e03d9a5780c3..80d57c8ddae8 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/deployments.ts @@ -21,7 +21,7 @@ import { DeploymentsUpdateOptionalParams, DeploymentsUpdateResponse, DeploymentsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Deployments. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts index 6eddc917938d..d4b916284140 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/encryptionScopes.ts @@ -17,7 +17,7 @@ import { EncryptionScopesCreateOrUpdateResponse, EncryptionScopesDeleteOptionalParams, EncryptionScopesDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a EncryptionScopes. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts index 17996d460adc..7349e4f4540e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/index.ts @@ -6,23 +6,23 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./accounts"; -export * from "./deletedAccounts"; -export * from "./resourceSkus"; -export * from "./usages"; -export * from "./operations"; -export * from "./commitmentTiers"; -export * from "./models"; -export * from "./locationBasedModelCapacities"; -export * from "./modelCapacities"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./deployments"; -export * from "./commitmentPlans"; -export * from "./encryptionScopes"; -export * from "./raiPolicies"; -export * from "./raiBlocklists"; -export * from "./raiBlocklistItems"; -export * from "./raiContentFilters"; -export * from "./networkSecurityPerimeterConfigurations"; -export * from "./defenderForAISettings"; +export * from "./accounts.js"; +export * from "./deletedAccounts.js"; +export * from "./resourceSkus.js"; +export * from "./usages.js"; +export * from "./operations.js"; +export * from "./commitmentTiers.js"; +export * from "./models.js"; +export * from "./locationBasedModelCapacities.js"; +export * from "./modelCapacities.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./deployments.js"; +export * from "./commitmentPlans.js"; +export * from "./encryptionScopes.js"; +export * from "./raiPolicies.js"; +export * from "./raiBlocklists.js"; +export * from "./raiBlocklistItems.js"; +export * from "./raiContentFilters.js"; +export * from "./networkSecurityPerimeterConfigurations.js"; +export * from "./defenderForAISettings.js"; diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts index 36725cb7a543..1b378011f67f 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/locationBasedModelCapacities.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { ModelCapacityListResultValueItem, LocationBasedModelCapacitiesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a LocationBasedModelCapacities. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts index 083b55723c71..9311c366603b 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/modelCapacities.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { ModelCapacityListResultValueItem, ModelCapacitiesListOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ModelCapacities. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts index e068d3e9b962..a7fbaf3bb2a6 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/models.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Model, ModelsListOptionalParams } from "../models"; +import { Model, ModelsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Models. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts index 13d2aee27add..e88cf4896732 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts @@ -15,7 +15,7 @@ import { NetworkSecurityPerimeterConfigurationsGetResponse, NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, NetworkSecurityPerimeterConfigurationsReconcileResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a NetworkSecurityPerimeterConfigurations. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts index 7e6f6f4ab337..8568c18fc4ab 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/operations.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/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/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts index 812ef256f956..0f4cafac7603 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateEndpointConnections.ts @@ -16,7 +16,7 @@ import { PrivateEndpointConnectionsCreateOrUpdateOptionalParams, PrivateEndpointConnectionsCreateOrUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /** Interface representing a PrivateEndpointConnections. */ export interface PrivateEndpointConnections { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts index 8f2562c64719..2ea5fc216bf9 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/privateLinkResources.ts @@ -9,7 +9,7 @@ import { PrivateLinkResourcesListOptionalParams, PrivateLinkResourcesListResponse, -} from "../models"; +} from "../models/index.js"; /** Interface representing a PrivateLinkResources. */ export interface PrivateLinkResources { diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts index f9da14cb3246..f96bac17aa89 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklistItems.ts @@ -21,7 +21,7 @@ import { RaiBlocklistItemsBatchAddOptionalParams, RaiBlocklistItemsBatchAddResponse, RaiBlocklistItemsBatchDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RaiBlocklistItems. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts index 987f447f5b62..05f51200d67d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiBlocklists.ts @@ -17,7 +17,7 @@ import { RaiBlocklistsCreateOrUpdateResponse, RaiBlocklistsDeleteOptionalParams, RaiBlocklistsDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RaiBlocklists. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts index 3ef03551662a..9308b1836a44 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiContentFilters.ts @@ -12,7 +12,7 @@ import { RaiContentFiltersListOptionalParams, RaiContentFiltersGetOptionalParams, RaiContentFiltersGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RaiContentFilters. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts index 436a4e9c3a1d..c2841363e72d 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/raiPolicies.ts @@ -17,7 +17,7 @@ import { RaiPoliciesCreateOrUpdateResponse, RaiPoliciesDeleteOptionalParams, RaiPoliciesDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a RaiPolicies. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts index 97e00392fce2..23b2b3a667af 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/resourceSkus.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ResourceSku, ResourceSkusListOptionalParams } from "../models"; +import { ResourceSku, ResourceSkusListOptionalParams } from "../models/index.js"; /// /** Interface representing a ResourceSkus. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts index 149a992347fc..af45047931ee 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/src/operationsInterfaces/usages.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Usage, UsagesListOptionalParams } from "../models"; +import { Usage, UsagesListOptionalParams } from "../models/index.js"; /// /** Interface representing a Usages. */ diff --git a/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_congitiveservice.spec.ts b/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_congitiveservice.spec.ts index bb139f721620..59169609732e 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_congitiveservice.spec.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_congitiveservice.spec.ts @@ -10,9 +10,8 @@ import { isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CognitiveServicesManagementClient } from "../src/cognitiveServicesManagementClient"; +import { CognitiveServicesManagementClient } from "../src/cognitiveServicesManagementClient.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -41,8 +40,8 @@ describe("CognitiveServices test", () => { let resourceGroup: string; let accountName: 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 @@ -95,8 +94,8 @@ describe("CognitiveServices test", () => { }); it("accounts delete test", async function () { - const res = await client.accounts.beginDeleteAndWait(resourceGroup, accountName, testPollingOptions); const resArray = new Array(); + await client.accounts.beginDeleteAndWait(resourceGroup, accountName, testPollingOptions); for await (let item of client.accounts.listByResourceGroup(resourceGroup)) { resArray.push(item); } diff --git a/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts b/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts index 0d6f580cf231..e91c764100c4 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts +++ b/sdk/cognitiveservices/arm-cognitiveservices/test/cognitiveservices_openai.spec.ts @@ -10,10 +10,9 @@ import { isPlaybackMode, } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { CognitiveServicesManagementClient } from "../src/cognitiveServicesManagementClient"; -import { Deployment } from "../src/models"; +import { CognitiveServicesManagementClient } from "../src/cognitiveServicesManagementClient.js"; +import { Deployment } from "../src/models/index.js"; +import { describe, it, assert, beforeEach, afterEach } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -43,8 +42,8 @@ describe.skip("CognitiveServices OpenAI test", () => { let accountName: string; let deploymentName: 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 diff --git a/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.browser.config.json b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/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/cognitiveservices/arm-cognitiveservices/tsconfig.json b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.json index 5403e932e732..19ceb382b521 100644 --- a/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.json +++ b/sdk/cognitiveservices/arm-cognitiveservices/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-cognitiveservices": [ - "./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/cognitiveservices/arm-cognitiveservices/tsconfig.samples.json b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.samples.json new file mode 100644 index 000000000000..674d24f9f6ff --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-cognitiveservices": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.src.json b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.test.json b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/cognitiveservices/arm-cognitiveservices/vitest.browser.config.ts b/sdk/cognitiveservices/arm-cognitiveservices/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/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/cognitiveservices/arm-cognitiveservices/vitest.config.ts b/sdk/cognitiveservices/arm-cognitiveservices/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/vitest.config.ts @@ -0,0 +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 mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/cognitiveservices/arm-cognitiveservices/vitest.esm.config.ts b/sdk/cognitiveservices/arm-cognitiveservices/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/cognitiveservices/arm-cognitiveservices/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 +); diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/api-extractor.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/api-extractor.json index 382fa2a1fe35..5fb451cb7aa8 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/api-extractor.json +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/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-commerce-profile-2020-09-01-hybrid.d.ts" + "publicTrimmedFilePath": "dist/arm-commerce-profile-2020-09-01-hybrid.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json index 53e53c544f7b..470c8850dfba 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/package.json @@ -22,22 +22,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-commerce-profile-2020-09-01-hybrid.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.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", @@ -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", @@ -86,7 +76,7 @@ "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:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -107,5 +97,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-commerce-profile-2020-09-01-hybrid?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", + "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" + } + } } } diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples-dev/rateCardGetSample.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples-dev/rateCardGetSample.ts index 89a6d8a1fb4d..dbb9d5157343 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples-dev/rateCardGetSample.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples-dev/rateCardGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { UsageManagementClient } from "@azure/arm-commerce-profile-2020-09-01-hybrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change. diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/src/rateCardGetSample.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/src/rateCardGetSample.ts index 89a6d8a1fb4d..dbb9d5157343 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/src/rateCardGetSample.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/samples/v2/typescript/src/rateCardGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { UsageManagementClient } from "@azure/arm-commerce-profile-2020-09-01-hybrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change. diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/index.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/index.ts index b2c58875f155..7fe900992865 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/index.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { UsageManagementClient } from "./usageManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { UsageManagementClient } from "./usageManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/index.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/index.ts index 39f5f89334dc..66a71c37ecf5 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/index.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/index.ts @@ -6,5 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./usageAggregates"; -export * from "./rateCard"; +export * from "./usageAggregates.js"; +export * from "./rateCard.js"; diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/rateCard.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/rateCard.ts index cbb670ffceb2..e6b1029f29d8 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/rateCard.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/rateCard.ts @@ -6,12 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { RateCard } from "../operationsInterfaces"; +import { RateCard } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { UsageManagementClient } from "../usageManagementClient"; -import { RateCardGetOptionalParams, RateCardGetResponse } from "../models"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UsageManagementClient } from "../usageManagementClient.js"; +import { RateCardGetOptionalParams, RateCardGetResponse } from "../models/index.js"; /** Class containing RateCard operations. */ export class RateCardImpl implements RateCard { diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/usageAggregates.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/usageAggregates.ts index 60cf6b67620d..5882f40a9e18 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/usageAggregates.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operations/usageAggregates.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { UsageAggregates } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { UsageAggregates } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { UsageManagementClient } from "../usageManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UsageManagementClient } from "../usageManagementClient.js"; import { UsageAggregation, UsageAggregatesListNextOptionalParams, UsageAggregatesListOptionalParams, UsageAggregatesListResponse, UsageAggregatesListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing UsageAggregates operations. */ diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/index.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/index.ts index 39f5f89334dc..66a71c37ecf5 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/index.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/index.ts @@ -6,5 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./usageAggregates"; -export * from "./rateCard"; +export * from "./usageAggregates.js"; +export * from "./rateCard.js"; diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/rateCard.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/rateCard.ts index 49dfc9d5ac6e..ac66c263ed70 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/rateCard.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/rateCard.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { RateCardGetOptionalParams, RateCardGetResponse } from "../models"; +import { RateCardGetOptionalParams, RateCardGetResponse } from "../models/index.js"; /** Interface representing a RateCard. */ export interface RateCard { diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/usageAggregates.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/usageAggregates.ts index b62b9807cdd0..7c80067a070c 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/usageAggregates.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/operationsInterfaces/usageAggregates.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { UsageAggregation, UsageAggregatesListOptionalParams } from "../models"; +import { UsageAggregation, UsageAggregatesListOptionalParams } from "../models/index.js"; /// /** Interface representing a UsageAggregates. */ diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/usageManagementClient.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/usageManagementClient.ts index bf8693d7b922..7493a7a89b1c 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/usageManagementClient.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/src/usageManagementClient.ts @@ -14,9 +14,9 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { UsageAggregatesImpl, RateCardImpl } from "./operations"; -import { UsageAggregates, RateCard } from "./operationsInterfaces"; -import { UsageManagementClientOptionalParams } from "./models"; +import { UsageAggregatesImpl, RateCardImpl } from "./operations/index.js"; +import { UsageAggregates, RateCard } from "./operationsInterfaces/index.js"; +import { UsageManagementClientOptionalParams } from "./models/index.js"; export class UsageManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/sampleTest.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/sampleTest.spec.ts similarity index 85% rename from sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/sampleTest.ts rename to sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/sampleTest.spec.ts index 8ff7deb0acbe..e25d3db273e7 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/sampleTest.ts +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/test/sampleTest.spec.ts @@ -8,11 +8,9 @@ import { Recorder, - RecorderStartOptions, - env + RecorderStartOptions } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { Context } from "mocha"; +import { afterEach, beforeEach, describe, it } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -32,8 +30,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); }); diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.browser.config.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/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/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.json index ca3e46f864f7..19ceb382b521 100644 --- a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.json +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/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-commerce-profile-2020-09-01-hybrid": [ - "./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/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.samples.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.samples.json new file mode 100644 index 000000000000..3923e88f6744 --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-commerce-profile-2020-09-01-hybrid": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.src.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.test.json b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.browser.config.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/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/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.config.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.config.ts @@ -0,0 +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 mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.esm.config.ts b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/commerce/arm-commerce-profile-2020-09-01-hybrid/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 +); diff --git a/sdk/commerce/arm-commerce/api-extractor.json b/sdk/commerce/arm-commerce/api-extractor.json index e20274e44d6e..6887b32d623f 100644 --- a/sdk/commerce/arm-commerce/api-extractor.json +++ b/sdk/commerce/arm-commerce/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-commerce.d.ts" + "publicTrimmedFilePath": "dist/arm-commerce.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/commerce/arm-commerce/package.json b/sdk/commerce/arm-commerce/package.json index 075886d8a4f5..cd5b5a96b1b4 100644 --- a/sdk/commerce/arm-commerce/package.json +++ b/sdk/commerce/arm-commerce/package.json @@ -22,21 +22,21 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-commerce.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.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/commerce/arm-commerce", "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", @@ -86,7 +76,7 @@ "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:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -106,5 +96,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-commerce?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", + "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" + } + } } } diff --git a/sdk/commerce/arm-commerce/src/index.ts b/sdk/commerce/arm-commerce/src/index.ts index b2c58875f155..7fe900992865 100644 --- a/sdk/commerce/arm-commerce/src/index.ts +++ b/sdk/commerce/arm-commerce/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { UsageManagementClient } from "./usageManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { UsageManagementClient } from "./usageManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/commerce/arm-commerce/src/operations/index.ts b/sdk/commerce/arm-commerce/src/operations/index.ts index 39f5f89334dc..66a71c37ecf5 100644 --- a/sdk/commerce/arm-commerce/src/operations/index.ts +++ b/sdk/commerce/arm-commerce/src/operations/index.ts @@ -6,5 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./usageAggregates"; -export * from "./rateCard"; +export * from "./usageAggregates.js"; +export * from "./rateCard.js"; diff --git a/sdk/commerce/arm-commerce/src/operations/rateCard.ts b/sdk/commerce/arm-commerce/src/operations/rateCard.ts index cbb670ffceb2..e6b1029f29d8 100644 --- a/sdk/commerce/arm-commerce/src/operations/rateCard.ts +++ b/sdk/commerce/arm-commerce/src/operations/rateCard.ts @@ -6,12 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { RateCard } from "../operationsInterfaces"; +import { RateCard } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { UsageManagementClient } from "../usageManagementClient"; -import { RateCardGetOptionalParams, RateCardGetResponse } from "../models"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UsageManagementClient } from "../usageManagementClient.js"; +import { RateCardGetOptionalParams, RateCardGetResponse } from "../models/index.js"; /** Class containing RateCard operations. */ export class RateCardImpl implements RateCard { diff --git a/sdk/commerce/arm-commerce/src/operations/usageAggregates.ts b/sdk/commerce/arm-commerce/src/operations/usageAggregates.ts index 4e1751e53c7e..2166a3b92332 100644 --- a/sdk/commerce/arm-commerce/src/operations/usageAggregates.ts +++ b/sdk/commerce/arm-commerce/src/operations/usageAggregates.ts @@ -7,19 +7,19 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { UsageAggregates } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { UsageAggregates } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { UsageManagementClient } from "../usageManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { UsageManagementClient } from "../usageManagementClient.js"; import { UsageAggregation, UsageAggregatesListNextOptionalParams, UsageAggregatesListOptionalParams, UsageAggregatesListResponse, UsageAggregatesListNextResponse -} from "../models"; +} from "../models/index.js"; /// /** Class containing UsageAggregates operations. */ diff --git a/sdk/commerce/arm-commerce/src/operationsInterfaces/index.ts b/sdk/commerce/arm-commerce/src/operationsInterfaces/index.ts index 39f5f89334dc..66a71c37ecf5 100644 --- a/sdk/commerce/arm-commerce/src/operationsInterfaces/index.ts +++ b/sdk/commerce/arm-commerce/src/operationsInterfaces/index.ts @@ -6,5 +6,5 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./usageAggregates"; -export * from "./rateCard"; +export * from "./usageAggregates.js"; +export * from "./rateCard.js"; diff --git a/sdk/commerce/arm-commerce/src/operationsInterfaces/rateCard.ts b/sdk/commerce/arm-commerce/src/operationsInterfaces/rateCard.ts index 49dfc9d5ac6e..ac66c263ed70 100644 --- a/sdk/commerce/arm-commerce/src/operationsInterfaces/rateCard.ts +++ b/sdk/commerce/arm-commerce/src/operationsInterfaces/rateCard.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { RateCardGetOptionalParams, RateCardGetResponse } from "../models"; +import { RateCardGetOptionalParams, RateCardGetResponse } from "../models/index.js"; /** Interface representing a RateCard. */ export interface RateCard { diff --git a/sdk/commerce/arm-commerce/src/operationsInterfaces/usageAggregates.ts b/sdk/commerce/arm-commerce/src/operationsInterfaces/usageAggregates.ts index b62b9807cdd0..7c80067a070c 100644 --- a/sdk/commerce/arm-commerce/src/operationsInterfaces/usageAggregates.ts +++ b/sdk/commerce/arm-commerce/src/operationsInterfaces/usageAggregates.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { UsageAggregation, UsageAggregatesListOptionalParams } from "../models"; +import { UsageAggregation, UsageAggregatesListOptionalParams } from "../models/index.js"; /// /** Interface representing a UsageAggregates. */ diff --git a/sdk/commerce/arm-commerce/src/usageManagementClient.ts b/sdk/commerce/arm-commerce/src/usageManagementClient.ts index a7dc9ad03525..6e948ff77cd3 100644 --- a/sdk/commerce/arm-commerce/src/usageManagementClient.ts +++ b/sdk/commerce/arm-commerce/src/usageManagementClient.ts @@ -14,9 +14,9 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -import { UsageAggregatesImpl, RateCardImpl } from "./operations"; -import { UsageAggregates, RateCard } from "./operationsInterfaces"; -import { UsageManagementClientOptionalParams } from "./models"; +import { UsageAggregatesImpl, RateCardImpl } from "./operations/index.js"; +import { UsageAggregates, RateCard } from "./operationsInterfaces/index.js"; +import { UsageManagementClientOptionalParams } from "./models/index.js"; export class UsageManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/commerce/arm-commerce/test/commerce_examples.ts b/sdk/commerce/arm-commerce/test/commerce_examples.spec.ts similarity index 84% rename from sdk/commerce/arm-commerce/test/commerce_examples.ts rename to sdk/commerce/arm-commerce/test/commerce_examples.spec.ts index 57ee34617c65..cd44d6b569f6 100644 --- a/sdk/commerce/arm-commerce/test/commerce_examples.ts +++ b/sdk/commerce/arm-commerce/test/commerce_examples.spec.ts @@ -10,14 +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 { UsageManagementClient } from "../src/usageManagementClient"; -import { setClientRequestIdPolicy } from "@azure/core-rest-pipeline"; +import { UsageManagementClient } from "../src/usageManagementClient.js"; +import { afterEach, assert, beforeEach, describe, it } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -42,18 +39,14 @@ describe("Commerce test", () => { let recorder: Recorder; let subscriptionId: string; let client: UsageManagementClient; - let location: string; - let resourceGroup: 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 const credential = createTestCredential(); client = new UsageManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; }); afterEach(async function () { diff --git a/sdk/commerce/arm-commerce/tsconfig.browser.config.json b/sdk/commerce/arm-commerce/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/commerce/arm-commerce/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/commerce/arm-commerce/tsconfig.json b/sdk/commerce/arm-commerce/tsconfig.json index 7e7b314b0f0d..19ceb382b521 100644 --- a/sdk/commerce/arm-commerce/tsconfig.json +++ b/sdk/commerce/arm-commerce/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-commerce": [ - "./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/commerce/arm-commerce/tsconfig.samples.json b/sdk/commerce/arm-commerce/tsconfig.samples.json new file mode 100644 index 000000000000..860ec8644552 --- /dev/null +++ b/sdk/commerce/arm-commerce/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-commerce": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/commerce/arm-commerce/tsconfig.src.json b/sdk/commerce/arm-commerce/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/commerce/arm-commerce/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/commerce/arm-commerce/tsconfig.test.json b/sdk/commerce/arm-commerce/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/commerce/arm-commerce/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/commerce/arm-commerce/vitest.browser.config.ts b/sdk/commerce/arm-commerce/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/commerce/arm-commerce/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/commerce/arm-commerce/vitest.config.ts b/sdk/commerce/arm-commerce/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/commerce/arm-commerce/vitest.config.ts @@ -0,0 +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 mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/commerce/arm-commerce/vitest.esm.config.ts b/sdk/commerce/arm-commerce/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/commerce/arm-commerce/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 +); diff --git a/sdk/communication/arm-communication/api-extractor.json b/sdk/communication/arm-communication/api-extractor.json index 72ab30663dd2..915586fb338b 100644 --- a/sdk/communication/arm-communication/api-extractor.json +++ b/sdk/communication/arm-communication/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-communication.d.ts" + "publicTrimmedFilePath": "dist/arm-communication.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/sdk/communication/arm-communication/package.json b/sdk/communication/arm-communication/package.json index 45c84742a4be..3e1a63d9d6c8 100644 --- a/sdk/communication/arm-communication/package.json +++ b/sdk/communication/arm-communication/package.json @@ -24,22 +24,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", - "module": "./dist-esm/src/index.js", - "types": "./types/arm-communication.d.ts", + "main": "./dist/commonjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/commonjs/index.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", @@ -88,7 +78,7 @@ "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:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -109,5 +99,45 @@ ], "disableDocsMs": true, "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-communication?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", + "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" + } + } } } diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesCheckNameAvailabilitySample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesCheckNameAvailabilitySample.ts index 66657a15dfd7..6d1ab2676fe8 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesCheckNameAvailabilitySample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that the CommunicationService name is valid and is not already in use. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesCreateOrUpdateSample.ts index b7a3bf4069bc..3fb97a2583a0 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create a new CommunicationService or update an existing CommunicationService. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesDeleteSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesDeleteSample.ts index 0d3d5e9536c9..36ab26fb399d 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesDeleteSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a CommunicationService. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesGetSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesGetSample.ts index b595fc892669..b19502a52edc 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesGetSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the CommunicationService and its properties. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesLinkNotificationHubSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesLinkNotificationHubSample.ts index ede9465b8033..422c2d07d21e 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesLinkNotificationHubSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesLinkNotificationHubSample.ts @@ -14,9 +14,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Links an Azure Notification Hub to this communication service. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesListByResourceGroupSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesListByResourceGroupSample.ts index dc919c06b1c0..b3fcb46636f7 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesListByResourceGroupSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a resource group. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesListBySubscriptionSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesListBySubscriptionSample.ts index 785ff317f0ea..c5f1c7c1160d 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesListBySubscriptionSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a subscription. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesListKeysSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesListKeysSample.ts index acd662eda756..8790613506f4 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesListKeysSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the access keys of the CommunicationService resource. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesRegenerateKeySample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesRegenerateKeySample.ts index 3a18536faf35..0726ad305502 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesRegenerateKeySample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. diff --git a/sdk/communication/arm-communication/samples-dev/communicationServicesUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/communicationServicesUpdateSample.ts index 4cf70e1db4c7..e537488067f3 100644 --- a/sdk/communication/arm-communication/samples-dev/communicationServicesUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/communicationServicesUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to update an existing CommunicationService. diff --git a/sdk/communication/arm-communication/samples-dev/domainsCancelVerificationSample.ts b/sdk/communication/arm-communication/samples-dev/domainsCancelVerificationSample.ts index 5fd8ed0914cb..534d5e68f0f5 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsCancelVerificationSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsCancelVerificationSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Cancel verification of DNS record. diff --git a/sdk/communication/arm-communication/samples-dev/domainsCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/domainsCreateOrUpdateSample.ts index 325735b89b95..c0f14aa6b57f 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add a new Domains resource under the parent EmailService resource or update an existing Domains resource. diff --git a/sdk/communication/arm-communication/samples-dev/domainsDeleteSample.ts b/sdk/communication/arm-communication/samples-dev/domainsDeleteSample.ts index 83216363cff2..c3d041c49e39 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsDeleteSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a Domains resource. diff --git a/sdk/communication/arm-communication/samples-dev/domainsGetSample.ts b/sdk/communication/arm-communication/samples-dev/domainsGetSample.ts index b65afa25f7b1..1b6d08ccb48b 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsGetSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the Domains resource and its properties. diff --git a/sdk/communication/arm-communication/samples-dev/domainsInitiateVerificationSample.ts b/sdk/communication/arm-communication/samples-dev/domainsInitiateVerificationSample.ts index 0da4656d63ac..3a7779a54b5a 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsInitiateVerificationSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsInitiateVerificationSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Initiate verification of DNS record. diff --git a/sdk/communication/arm-communication/samples-dev/domainsListByEmailServiceResourceSample.ts b/sdk/communication/arm-communication/samples-dev/domainsListByEmailServiceResourceSample.ts index a10e8d394842..43ed89404c1f 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsListByEmailServiceResourceSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsListByEmailServiceResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all Domains resources under the parent EmailServices resource. diff --git a/sdk/communication/arm-communication/samples-dev/domainsUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/domainsUpdateSample.ts index f6b54d8fcc18..0ce614a63304 100644 --- a/sdk/communication/arm-communication/samples-dev/domainsUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/domainsUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to update an existing Domains resource. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesCreateOrUpdateSample.ts index 883eeeb9452f..b4d2550470d5 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create a new EmailService or update an existing EmailService. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesDeleteSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesDeleteSample.ts index d78b63fcef7c..c1ece5947cc5 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesDeleteSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a EmailService. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesGetSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesGetSample.ts index 49d1f1ba3f09..b84f6cf6a1da 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesGetSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the EmailService and its properties. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesListByResourceGroupSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesListByResourceGroupSample.ts index e2476028cbd3..e3174217ed08 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesListByResourceGroupSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a resource group. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesListBySubscriptionSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesListBySubscriptionSample.ts index d7d28399aad3..055634df8e69 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesListBySubscriptionSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a subscription. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.ts index 14f561ea03c7..5263690f4e1a 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesListVerifiedExchangeOnlineDomainsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of domains that are fully verified in Exchange Online. diff --git a/sdk/communication/arm-communication/samples-dev/emailServicesUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/emailServicesUpdateSample.ts index f9781105f669..3e7181e3090c 100644 --- a/sdk/communication/arm-communication/samples-dev/emailServicesUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/emailServicesUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to update an existing EmailService. diff --git a/sdk/communication/arm-communication/samples-dev/operationsListSample.ts b/sdk/communication/arm-communication/samples-dev/operationsListSample.ts index a28be4a4a5dc..6dd75c5c486c 100644 --- a/sdk/communication/arm-communication/samples-dev/operationsListSample.ts +++ b/sdk/communication/arm-communication/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; 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 REST API operations of the Microsoft.Communication provider. diff --git a/sdk/communication/arm-communication/samples-dev/senderUsernamesCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples-dev/senderUsernamesCreateOrUpdateSample.ts index 53c5501ac675..584ecaaa8fc7 100644 --- a/sdk/communication/arm-communication/samples-dev/senderUsernamesCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples-dev/senderUsernamesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add a new SenderUsername resource under the parent Domains resource or update an existing SenderUsername resource. diff --git a/sdk/communication/arm-communication/samples-dev/senderUsernamesDeleteSample.ts b/sdk/communication/arm-communication/samples-dev/senderUsernamesDeleteSample.ts index f4f23a59f853..d992327e0881 100644 --- a/sdk/communication/arm-communication/samples-dev/senderUsernamesDeleteSample.ts +++ b/sdk/communication/arm-communication/samples-dev/senderUsernamesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a SenderUsernames resource. diff --git a/sdk/communication/arm-communication/samples-dev/senderUsernamesGetSample.ts b/sdk/communication/arm-communication/samples-dev/senderUsernamesGetSample.ts index af4724ec208f..25f6134979d9 100644 --- a/sdk/communication/arm-communication/samples-dev/senderUsernamesGetSample.ts +++ b/sdk/communication/arm-communication/samples-dev/senderUsernamesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a valid sender username for a domains resource. diff --git a/sdk/communication/arm-communication/samples-dev/senderUsernamesListByDomainsSample.ts b/sdk/communication/arm-communication/samples-dev/senderUsernamesListByDomainsSample.ts index 929791f20291..54ae9f42f853 100644 --- a/sdk/communication/arm-communication/samples-dev/senderUsernamesListByDomainsSample.ts +++ b/sdk/communication/arm-communication/samples-dev/senderUsernamesListByDomainsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all valid sender usernames for a domains resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCheckNameAvailabilitySample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCheckNameAvailabilitySample.ts index 66657a15dfd7..6d1ab2676fe8 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCheckNameAvailabilitySample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCheckNameAvailabilitySample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Checks that the CommunicationService name is valid and is not already in use. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCreateOrUpdateSample.ts index b7a3bf4069bc..3fb97a2583a0 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create a new CommunicationService or update an existing CommunicationService. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesDeleteSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesDeleteSample.ts index 0d3d5e9536c9..36ab26fb399d 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesDeleteSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a CommunicationService. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesGetSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesGetSample.ts index b595fc892669..b19502a52edc 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesGetSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the CommunicationService and its properties. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesLinkNotificationHubSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesLinkNotificationHubSample.ts index ede9465b8033..422c2d07d21e 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesLinkNotificationHubSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesLinkNotificationHubSample.ts @@ -14,9 +14,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Links an Azure Notification Hub to this communication service. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListByResourceGroupSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListByResourceGroupSample.ts index dc919c06b1c0..b3fcb46636f7 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListByResourceGroupSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a resource group. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListBySubscriptionSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListBySubscriptionSample.ts index 785ff317f0ea..c5f1c7c1160d 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListBySubscriptionSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a subscription. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListKeysSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListKeysSample.ts index acd662eda756..8790613506f4 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListKeysSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesListKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the access keys of the CommunicationService resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesRegenerateKeySample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesRegenerateKeySample.ts index 3a18536faf35..0726ad305502 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesRegenerateKeySample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at the same time. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesUpdateSample.ts index 4cf70e1db4c7..e537488067f3 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/communicationServicesUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to update an existing CommunicationService. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCancelVerificationSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCancelVerificationSample.ts index 5fd8ed0914cb..534d5e68f0f5 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCancelVerificationSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCancelVerificationSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Cancel verification of DNS record. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCreateOrUpdateSample.ts index 325735b89b95..c0f14aa6b57f 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add a new Domains resource under the parent EmailService resource or update an existing Domains resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsDeleteSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsDeleteSample.ts index 83216363cff2..c3d041c49e39 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsDeleteSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a Domains resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsGetSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsGetSample.ts index b65afa25f7b1..1b6d08ccb48b 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsGetSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the Domains resource and its properties. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsInitiateVerificationSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsInitiateVerificationSample.ts index 0da4656d63ac..3a7779a54b5a 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsInitiateVerificationSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsInitiateVerificationSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Initiate verification of DNS record. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsListByEmailServiceResourceSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsListByEmailServiceResourceSample.ts index a10e8d394842..43ed89404c1f 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsListByEmailServiceResourceSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsListByEmailServiceResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all Domains resources under the parent EmailServices resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsUpdateSample.ts index f6b54d8fcc18..0ce614a63304 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/domainsUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/domainsUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to update an existing Domains resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesCreateOrUpdateSample.ts index 883eeeb9452f..b4d2550470d5 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create a new EmailService or update an existing EmailService. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesDeleteSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesDeleteSample.ts index d78b63fcef7c..c1ece5947cc5 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesDeleteSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a EmailService. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesGetSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesGetSample.ts index 49d1f1ba3f09..b84f6cf6a1da 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesGetSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the EmailService and its properties. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListByResourceGroupSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListByResourceGroupSample.ts index e2476028cbd3..e3174217ed08 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListByResourceGroupSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a resource group. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListBySubscriptionSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListBySubscriptionSample.ts index d7d28399aad3..055634df8e69 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListBySubscriptionSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Handles requests to list all resources in a subscription. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListVerifiedExchangeOnlineDomainsSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListVerifiedExchangeOnlineDomainsSample.ts index 14f561ea03c7..5263690f4e1a 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListVerifiedExchangeOnlineDomainsSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesListVerifiedExchangeOnlineDomainsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of domains that are fully verified in Exchange Online. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesUpdateSample.ts index f9781105f669..3e7181e3090c 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/emailServicesUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to update an existing EmailService. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/operationsListSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/operationsListSample.ts index a28be4a4a5dc..6dd75c5c486c 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/operationsListSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; 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 REST API operations of the Microsoft.Communication provider. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesCreateOrUpdateSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesCreateOrUpdateSample.ts index 53c5501ac675..584ecaaa8fc7 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesCreateOrUpdateSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { CommunicationServiceManagementClient, } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Add a new SenderUsername resource under the parent Domains resource or update an existing SenderUsername resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesDeleteSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesDeleteSample.ts index f4f23a59f853..d992327e0881 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesDeleteSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Operation to delete a SenderUsernames resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesGetSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesGetSample.ts index af4724ec208f..25f6134979d9 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesGetSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a valid sender username for a domains resource. diff --git a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesListByDomainsSample.ts b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesListByDomainsSample.ts index 929791f20291..54ae9f42f853 100644 --- a/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesListByDomainsSample.ts +++ b/sdk/communication/arm-communication/samples/v4/typescript/src/senderUsernamesListByDomainsSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CommunicationServiceManagementClient } from "@azure/arm-communication"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all valid sender usernames for a domains resource. diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts index cf6918db0320..3b06eda99f8e 100644 --- a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts @@ -20,15 +20,15 @@ import { DomainsImpl, EmailServicesImpl, SenderUsernamesImpl, -} from "./operations"; +} from "./operations/index.js"; import { Operations, CommunicationServices, Domains, EmailServices, SenderUsernames, -} from "./operationsInterfaces"; -import { CommunicationServiceManagementClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { CommunicationServiceManagementClientOptionalParams } from "./models/index.js"; export class CommunicationServiceManagementClient extends coreClient.ServiceClient { $host: string; diff --git a/sdk/communication/arm-communication/src/index.ts b/sdk/communication/arm-communication/src/index.ts index f970939965f3..39eafee0463e 100644 --- a/sdk/communication/arm-communication/src/index.ts +++ b/sdk/communication/arm-communication/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { CommunicationServiceManagementClient } from "./communicationServiceManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { CommunicationServiceManagementClient } from "./communicationServiceManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/communication/arm-communication/src/models/parameters.ts b/sdk/communication/arm-communication/src/models/parameters.ts index 7038a60bb4cf..e095cb166a8a 100644 --- a/sdk/communication/arm-communication/src/models/parameters.ts +++ b/sdk/communication/arm-communication/src/models/parameters.ts @@ -23,7 +23,7 @@ import { EmailServiceResource as EmailServiceResourceMapper, EmailServiceResourceUpdate as EmailServiceResourceUpdateMapper, SenderUsernameResource as SenderUsernameResourceMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", diff --git a/sdk/communication/arm-communication/src/operations/communicationServices.ts b/sdk/communication/arm-communication/src/operations/communicationServices.ts index 4d5f63bf6c23..7fe97d951681 100644 --- a/sdk/communication/arm-communication/src/operations/communicationServices.ts +++ b/sdk/communication/arm-communication/src/operations/communicationServices.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CommunicationServices } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { CommunicationServices } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { CommunicationServiceResource, CommunicationServicesListBySubscriptionNextOptionalParams, @@ -47,7 +47,7 @@ import { CommunicationServicesRegenerateKeyResponse, CommunicationServicesListBySubscriptionNextResponse, CommunicationServicesListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CommunicationServices operations. */ diff --git a/sdk/communication/arm-communication/src/operations/domains.ts b/sdk/communication/arm-communication/src/operations/domains.ts index 87fb0f8f3231..c6b48a98885a 100644 --- a/sdk/communication/arm-communication/src/operations/domains.ts +++ b/sdk/communication/arm-communication/src/operations/domains.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Domains } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Domains } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { DomainResource, DomainsListByEmailServiceResourceNextOptionalParams, @@ -38,7 +38,7 @@ import { DomainsCancelVerificationOptionalParams, DomainsCancelVerificationResponse, DomainsListByEmailServiceResourceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Domains operations. */ diff --git a/sdk/communication/arm-communication/src/operations/emailServices.ts b/sdk/communication/arm-communication/src/operations/emailServices.ts index adc1eb9b5378..f67ee0a06524 100644 --- a/sdk/communication/arm-communication/src/operations/emailServices.ts +++ b/sdk/communication/arm-communication/src/operations/emailServices.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { EmailServices } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { EmailServices } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EmailServiceResource, EmailServicesListBySubscriptionNextOptionalParams, @@ -39,7 +39,7 @@ import { EmailServicesListVerifiedExchangeOnlineDomainsResponse, EmailServicesListBySubscriptionNextResponse, EmailServicesListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing EmailServices operations. */ diff --git a/sdk/communication/arm-communication/src/operations/index.ts b/sdk/communication/arm-communication/src/operations/index.ts index 1d47ce38a16e..f12e0ff5d953 100644 --- a/sdk/communication/arm-communication/src/operations/index.ts +++ b/sdk/communication/arm-communication/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 "./communicationServices"; -export * from "./domains"; -export * from "./emailServices"; -export * from "./senderUsernames"; +export * from "./operations.js"; +export * from "./communicationServices.js"; +export * from "./domains.js"; +export * from "./emailServices.js"; +export * from "./senderUsernames.js"; diff --git a/sdk/communication/arm-communication/src/operations/operations.ts b/sdk/communication/arm-communication/src/operations/operations.ts index ea25d49c35f9..8e9feaf71ba7 100644 --- a/sdk/communication/arm-communication/src/operations/operations.ts +++ b/sdk/communication/arm-communication/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 { CommunicationServiceManagementClient } from "../communicationServiceManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient.js"; import { Operation, OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, OperationsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/communication/arm-communication/src/operations/senderUsernames.ts b/sdk/communication/arm-communication/src/operations/senderUsernames.ts index 1e1b42afcf0b..ee28dd5a9485 100644 --- a/sdk/communication/arm-communication/src/operations/senderUsernames.ts +++ b/sdk/communication/arm-communication/src/operations/senderUsernames.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { SenderUsernames } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { SenderUsernames } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { CommunicationServiceManagementClient } from "../communicationServiceManagementClient.js"; import { SenderUsernameResource, SenderUsernamesListByDomainsNextOptionalParams, @@ -24,7 +24,7 @@ import { SenderUsernamesCreateOrUpdateResponse, SenderUsernamesDeleteOptionalParams, SenderUsernamesListByDomainsNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing SenderUsernames operations. */ diff --git a/sdk/communication/arm-communication/src/operationsInterfaces/communicationServices.ts b/sdk/communication/arm-communication/src/operationsInterfaces/communicationServices.ts index 134b901b6f7e..710626021d58 100644 --- a/sdk/communication/arm-communication/src/operationsInterfaces/communicationServices.ts +++ b/sdk/communication/arm-communication/src/operationsInterfaces/communicationServices.ts @@ -30,7 +30,7 @@ import { RegenerateKeyParameters, CommunicationServicesRegenerateKeyOptionalParams, CommunicationServicesRegenerateKeyResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CommunicationServices. */ diff --git a/sdk/communication/arm-communication/src/operationsInterfaces/domains.ts b/sdk/communication/arm-communication/src/operationsInterfaces/domains.ts index ebb18cd4b547..3da1b0a91e4a 100644 --- a/sdk/communication/arm-communication/src/operationsInterfaces/domains.ts +++ b/sdk/communication/arm-communication/src/operationsInterfaces/domains.ts @@ -24,7 +24,7 @@ import { DomainsInitiateVerificationResponse, DomainsCancelVerificationOptionalParams, DomainsCancelVerificationResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Domains. */ diff --git a/sdk/communication/arm-communication/src/operationsInterfaces/emailServices.ts b/sdk/communication/arm-communication/src/operationsInterfaces/emailServices.ts index 9e6200d2c6fc..e6b6bdaa795d 100644 --- a/sdk/communication/arm-communication/src/operationsInterfaces/emailServices.ts +++ b/sdk/communication/arm-communication/src/operationsInterfaces/emailServices.ts @@ -22,7 +22,7 @@ import { EmailServicesUpdateResponse, EmailServicesListVerifiedExchangeOnlineDomainsOptionalParams, EmailServicesListVerifiedExchangeOnlineDomainsResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a EmailServices. */ diff --git a/sdk/communication/arm-communication/src/operationsInterfaces/index.ts b/sdk/communication/arm-communication/src/operationsInterfaces/index.ts index 1d47ce38a16e..f12e0ff5d953 100644 --- a/sdk/communication/arm-communication/src/operationsInterfaces/index.ts +++ b/sdk/communication/arm-communication/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 "./communicationServices"; -export * from "./domains"; -export * from "./emailServices"; -export * from "./senderUsernames"; +export * from "./operations.js"; +export * from "./communicationServices.js"; +export * from "./domains.js"; +export * from "./emailServices.js"; +export * from "./senderUsernames.js"; diff --git a/sdk/communication/arm-communication/src/operationsInterfaces/operations.ts b/sdk/communication/arm-communication/src/operationsInterfaces/operations.ts index a02ae59a9429..9fb8bd871f10 100644 --- a/sdk/communication/arm-communication/src/operationsInterfaces/operations.ts +++ b/sdk/communication/arm-communication/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/communication/arm-communication/src/operationsInterfaces/senderUsernames.ts b/sdk/communication/arm-communication/src/operationsInterfaces/senderUsernames.ts index 0931148e3851..599142ce304b 100644 --- a/sdk/communication/arm-communication/src/operationsInterfaces/senderUsernames.ts +++ b/sdk/communication/arm-communication/src/operationsInterfaces/senderUsernames.ts @@ -15,7 +15,7 @@ import { SenderUsernamesCreateOrUpdateOptionalParams, SenderUsernamesCreateOrUpdateResponse, SenderUsernamesDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a SenderUsernames. */ diff --git a/sdk/communication/arm-communication/test/communication_examples.ts b/sdk/communication/arm-communication/test/communication_examples.spec.ts similarity index 89% rename from sdk/communication/arm-communication/test/communication_examples.ts rename to sdk/communication/arm-communication/test/communication_examples.spec.ts index 8ccf95548a5d..04fcbb577c49 100644 --- a/sdk/communication/arm-communication/test/communication_examples.ts +++ b/sdk/communication/arm-communication/test/communication_examples.spec.ts @@ -10,14 +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 { CommunicationServiceManagementClient } from "../src/communicationServiceManagementClient"; -import { hostname } from "os"; +import { CommunicationServiceManagementClient } from "../src/communicationServiceManagementClient.js"; +import { afterEach, assert, beforeEach, describe, it } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -48,8 +45,8 @@ describe("CommunicationService test", () => { let resourceGroup: string; let communicationServiceName: 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 @@ -83,8 +80,8 @@ describe("CommunicationService test", () => { }); it("communicationService delete test", async function () { - const res = await client.communicationServices.beginDeleteAndWait(resourceGroup, communicationServiceName, testPollingOptions); const resArray = new Array(); + await client.communicationServices.beginDeleteAndWait(resourceGroup, communicationServiceName, testPollingOptions); for await (let item of client.communicationServices.listByResourceGroup(resourceGroup)) { resArray.push(item); } diff --git a/sdk/communication/arm-communication/tsconfig.browser.config.json b/sdk/communication/arm-communication/tsconfig.browser.config.json new file mode 100644 index 000000000000..b6586181d006 --- /dev/null +++ b/sdk/communication/arm-communication/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/communication/arm-communication/tsconfig.json b/sdk/communication/arm-communication/tsconfig.json index 2549bb6e5ad4..19ceb382b521 100644 --- a/sdk/communication/arm-communication/tsconfig.json +++ b/sdk/communication/arm-communication/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-communication": [ - "./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/communication/arm-communication/tsconfig.samples.json b/sdk/communication/arm-communication/tsconfig.samples.json new file mode 100644 index 000000000000..cf172c3d369c --- /dev/null +++ b/sdk/communication/arm-communication/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-communication": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/communication/arm-communication/tsconfig.src.json b/sdk/communication/arm-communication/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/communication/arm-communication/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/communication/arm-communication/tsconfig.test.json b/sdk/communication/arm-communication/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/communication/arm-communication/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/communication/arm-communication/vitest.browser.config.ts b/sdk/communication/arm-communication/vitest.browser.config.ts new file mode 100644 index 000000000000..b48c61b2ef46 --- /dev/null +++ b/sdk/communication/arm-communication/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/communication/arm-communication/vitest.config.ts b/sdk/communication/arm-communication/vitest.config.ts new file mode 100644 index 000000000000..2a4750c84292 --- /dev/null +++ b/sdk/communication/arm-communication/vitest.config.ts @@ -0,0 +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 mergeConfig( + viteConfig, + defineConfig({ + test: { + hookTimeout: 1200000, + testTimeout: 1200000, + }, + }), +); diff --git a/sdk/communication/arm-communication/vitest.esm.config.ts b/sdk/communication/arm-communication/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/communication/arm-communication/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 +);