diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ff023c844e1a..43c132cda6b5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2489,7 +2489,7 @@ packages: version: 0.0.0 '@rush-temp/ai-content-safety@file:projects/ai-content-safety.tgz': - resolution: {integrity: sha512-xOpgdfH/OsMtcMu4u2C8aa7uxFogy07yAmnWakmDcGburi1wqsmrBybVYuuY9rQ65yzhxNMbQGaoVJEknkWnnA==, tarball: file:projects/ai-content-safety.tgz} + resolution: {integrity: sha512-7p70zsV3Ltl7OvqsM08XSA9JsS8J/GgGHVC5zs+72MHA7dmruDW17tWgRdDy9SFjodxhjpevtiaPnAGtBylSeQ==, tarball: file:projects/ai-content-safety.tgz} version: 0.0.0 '@rush-temp/ai-document-intelligence@file:projects/ai-document-intelligence.tgz': @@ -3797,11 +3797,11 @@ packages: version: 0.0.0 '@rush-temp/keyvault-keys@file:projects/keyvault-keys.tgz': - resolution: {integrity: sha512-NsRNSZEgu6v2GcTPI6//0ooo9j3mSW9+dRKlA9pYykNLrPHSBsOXdZDbz6+kSzN1DV/THbrEGTuuCIfcEV33Eg==, tarball: file:projects/keyvault-keys.tgz} + resolution: {integrity: sha512-QnvbnEZQ8oIu/u86Mj3bO78W2QCT7p7nAsieHpagj57kId53t58JfS05ji48YIAYmXiFW1Zq3WsCrJeL+z+HUw==, tarball: file:projects/keyvault-keys.tgz} version: 0.0.0 '@rush-temp/keyvault-secrets@file:projects/keyvault-secrets.tgz': - resolution: {integrity: sha512-fD04k0UvAxSf4/kzDtbAcEL4PZAeOJDy+4hJs3mAHTtDb+G/ss9VvZtH71JNW+1/dxWt4mklzSwYGew18pVpKQ==, tarball: file:projects/keyvault-secrets.tgz} + resolution: {integrity: sha512-OGEUGsNF7ecyHyedFMjz25FJaanFV7+7hVTxImuMAMj057qdI23fwxGoyEHPWDl6yhXd1ybza3LD3DGkoxzwHg==, tarball: file:projects/keyvault-secrets.tgz} version: 0.0.0 '@rush-temp/load-testing@file:projects/load-testing.tgz': @@ -3985,7 +3985,7 @@ packages: version: 0.0.0 '@rush-temp/purview-datamap@file:projects/purview-datamap.tgz': - resolution: {integrity: sha512-BsJd0lYCuWnjy1y/KNgf7wwuY4dzwq0grtDrnj+nn+BXdRV1AFj7AWidSWtASAPus0dEoSL31s7rGW70M0IBIw==, tarball: file:projects/purview-datamap.tgz} + resolution: {integrity: sha512-tuSXOMDNIISaKK/qhO13Zk+cmINPlX8/Dx/OhK+c1Zwuzr2n1Ln1g2rT5oASg/FvLg8ruJufhmTJauZcbGxTaQ==, tarball: file:projects/purview-datamap.tgz} version: 0.0.0 '@rush-temp/purview-scanning@file:projects/purview-scanning.tgz': @@ -19652,15 +19652,15 @@ snapshots: '@rush-temp/purview-datamap@file:projects/purview-datamap.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.12(@types/node@22.7.9))': dependencies: + '@microsoft/api-extractor': 7.49.1(@types/node@18.19.71) '@types/node': 18.19.71 - '@vitest/browser': 2.1.8(@types/node@18.19.71)(playwright@1.49.1)(typescript@5.7.3)(vite@5.4.12(@types/node@22.7.9))(vitest@2.1.8) + '@vitest/browser': 2.1.8(@types/node@18.19.71)(playwright@1.49.1)(typescript@5.6.3)(vite@5.4.12(@types/node@22.7.9))(vitest@2.1.8) '@vitest/coverage-istanbul': 2.1.8(vitest@2.1.8) - autorest: 3.7.1 dotenv: 16.4.7 eslint: 9.18.0 playwright: 1.49.1 tslib: 2.8.1 - typescript: 5.7.3 + typescript: 5.6.3 vitest: 2.1.8(@types/node@18.19.71)(@vitest/browser@2.1.8)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - '@edge-runtime/vm' @@ -25115,7 +25115,7 @@ snapshots: resolve-import: 1.4.6 rimraf: 5.0.10 sync-content: 1.0.2 - typescript: 5.5.4 + typescript: 5.7.3 walk-up-path: 3.0.1 tshy@2.0.1: diff --git a/sdk/purview/purview-datamap-rest/CHANGELOG.md b/sdk/purview/purview-datamap-rest/CHANGELOG.md index 192f3a417ade..cfa6c4d4f635 100644 --- a/sdk/purview/purview-datamap-rest/CHANGELOG.md +++ b/sdk/purview/purview-datamap-rest/CHANGELOG.md @@ -1,9 +1,7 @@ -## Release History +# Release History + +## 1.0.0 (2025-01-22) -### 1.0.0-beta.2 (2024-12-16) +### Features Added -#### Features Added -- refresh @azure-rest/purview-datamap sdk - -### 1.0.0-beta.1 (2024-03-04) - - Initial Release +The package of @azure-rest/purview-datamap is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/purview/purview-datamap-rest/LICENSE b/sdk/purview/purview-datamap-rest/LICENSE new file mode 100644 index 000000000000..2ad4de7b17f0 --- /dev/null +++ b/sdk/purview/purview-datamap-rest/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2025 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/sdk/purview/purview-datamap-rest/README.md b/sdk/purview/purview-datamap-rest/README.md index 1a9f434ba89f..008690e8b12c 100644 --- a/sdk/purview/purview-datamap-rest/README.md +++ b/sdk/purview/purview-datamap-rest/README.md @@ -1,6 +1,9 @@ # Azure PurviewDataMap REST client library for JavaScript -Microsoft Purview Data Map provides the foundation for data discovery and data governance. Microsoft Purview Data Map is a cloud native PaaS service that captures metadata about enterprise data present in analytics and operation systems on-premises and cloud. Azure PurviewDataMap client provides a set of APIs in Purview Data Map Data Plane. For a full list of APIs, please refer to [Data Map API](https://learn.microsoft.com/rest/api/purview/datamapdataplane/operation-groups?view=rest-purview-datamapdataplane-2023-09-01). +Purview Data Map Service is a fully managed cloud service whose users can +discover the data sources they need and understand the data sources they find. +At the same time, Data Map helps organizations get more value from their +existing investments. This spec defines REST API of Purview Data Map Service. **Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library** @@ -9,7 +12,6 @@ Key links: - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest) - [Package (NPM)](https://www.npmjs.com/package/@azure-rest/purview-datamap) - [API reference documentation](https://learn.microsoft.com/javascript/api/@azure-rest/purview-datamap?view=azure-node-preview) -- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/samples) ## Getting started @@ -35,52 +37,19 @@ To use an [Azure Active Directory (AAD) token credential](https://github.com/Azu provide an instance of the desired credential type obtained from the [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library. -To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) +To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use. As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) can be used to authenticate the client. -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: -AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET - -## Examples - -The following sections provide several code snippets covering some of the most common Purview DataMap scenarios, including: - -- [Get All Type Definitions](#get-all-type-definitions) - -### Get All Type Definitions - -```typescript -import PurviewDataMap from "@azure-rest/purview-datamap"; -import { DefaultAzureCredential } from "@azure/identity"; -import { isUnexpected } from "@azure-rest/purview-datamap"; -import "dotenv/config"; - -const endpoint = process.env["ENDPOINT"] || ""; - -async function main() { - console.log("== List entity typedefs sample =="); - const client = PurviewDataMap(endpoint, new DefaultAzureCredential()); - - const result = await client.path("/atlas/v2/types/typedefs").get(); - - if (isUnexpected(result)) { - throw result; - } -} - -main().catch(console.error); -``` - ## Troubleshooting ### Logging Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: -```ts +```javascript const { setLogLevel } = require("@azure/logger"); setLogLevel("info"); diff --git a/sdk/purview/purview-datamap-rest/api-extractor.json b/sdk/purview/purview-datamap-rest/api-extractor.json index 7c6e44572f3b..188bcfd454d2 100644 --- a/sdk/purview/purview-datamap-rest/api-extractor.json +++ b/sdk/purview/purview-datamap-rest/api-extractor.json @@ -1,6 +1,6 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "dist/esm/index.d.ts", + "mainEntryPointFilePath": "./dist/esm/index.d.ts", "docModel": { "enabled": true }, @@ -11,7 +11,7 @@ "dtsRollup": { "enabled": true, "untrimmedFilePath": "", - "publicTrimmedFilePath": "dist/purview-datamap.d.ts" + "publicTrimmedFilePath": "./types/purview-datamap.d.ts" }, "messages": { "tsdocMessageReporting": { @@ -28,4 +28,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/purview/purview-datamap-rest/assets.json b/sdk/purview/purview-datamap-rest/assets.json deleted file mode 100644 index 8073e79aa4f6..000000000000 --- a/sdk/purview/purview-datamap-rest/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/purview/purview-datamap-rest", - "Tag": "js/purview/purview-datamap-rest_47b9910f06" -} diff --git a/sdk/purview/purview-datamap-rest/eslint.config.mjs b/sdk/purview/purview-datamap-rest/eslint.config.mjs index 48face69cf92..a9fcfbef11ff 100644 --- a/sdk/purview/purview-datamap-rest/eslint.config.mjs +++ b/sdk/purview/purview-datamap-rest/eslint.config.mjs @@ -4,6 +4,12 @@ export default azsdkEslint.config([ { rules: { "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "@azure/azure-sdk/ts-package-json-module": "off", + "@azure/azure-sdk/ts-package-json-files-required": "off", + "@azure/azure-sdk/ts-package-json-main-is-cjs": "off", "tsdoc/syntax": "warn", }, }, diff --git a/sdk/purview/purview-datamap-rest/package.json b/sdk/purview/purview-datamap-rest/package.json index 3d2ea3ceec2a..59c1a28a900c 100644 --- a/sdk/purview/purview-datamap-rest/package.json +++ b/sdk/purview/purview-datamap-rest/package.json @@ -1,9 +1,29 @@ { "name": "@azure-rest/purview-datamap", - "sdk-type": "client", - "author": "Microsoft Corporation", - "version": "1.0.0-beta.2", + "version": "1.0.0", "description": "Purview DataMap Service\"", + "engines": { + "node": ">=18.0.0" + }, + "sideEffects": false, + "autoPublish": false, + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" + ], + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false + }, + "type": "module", "keywords": [ "node", "azure", @@ -12,55 +32,32 @@ "browser", "isomorphic" ], + "author": "Microsoft Corporation", "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, "files": [ "dist/", "README.md", "LICENSE" ], - "engines": { - "node": ">=18.0.0" + "sdk-type": "client", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, - "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:browser": "dev-tool run build-package && dev-tool run vendored cross-env ONLY_BROWSER=true rollup -c 2>&1", - "build:debug": "dev-tool run build-package && dev-tool run bundle && dev-tool run extract-api", - "build:node": "dev-tool run build-package && dev-tool run vendored cross-env ONLY_NODE=true rollup -c 2>&1", - "build:samples": "echo skipped.", - "build:test": "dev-tool run build-package && dev-tool run bundle", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"", - "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 vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"", - "generate:client": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", - "integration-test:node": "dev-tool run test:vitest --esm", - "lint": "eslint package.json api-extractor.json src test", - "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", - "pack": "npm pack 2>&1", - "test": "npm run clean && npm run build:test && npm run unit-test", - "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", - "test:node": "npm run clean && npm run build:test && npm run unit-test:node", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", - "unit-test:node": "dev-tool run test:vitest", - "update-snippets": "echo skipped" + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/README.md", + "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", + "//metadata": { + "constantPaths": [ + { + "path": "src/purviewDataMapClient.ts", + "prefix": "userAgentInfo" + } + ] }, - "sideEffects": false, - "autoPublish": false, "dependencies": { "@azure-rest/core-client": "^2.3.1", "@azure/core-auth": "^1.9.0", - "@azure/core-rest-pipeline": "^1.18.0", + "@azure/core-rest-pipeline": "^1.18.2", "@azure/logger": "^1.1.4", "tslib": "^2.8.1" }, @@ -70,44 +67,44 @@ "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure/identity": "^4.0.1", + "@azure/identity": "^4.6.0", + "@microsoft/api-extractor": "^7.40.3", "@types/node": "^18.0.0", - "@vitest/browser": "^2.1.5", - "@vitest/coverage-istanbul": "^2.1.5", - "autorest": "latest", + "@vitest/browser": "^2.1.8", + "@vitest/coverage-istanbul": "^2.1.8", "dotenv": "^16.0.0", "eslint": "^9.9.0", - "playwright": "^1.49.0", - "typescript": "~5.7.2", - "vitest": "^2.1.5" + "playwright": "^1.49.1", + "typescript": "~5.6.2", + "vitest": "^2.1.8" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/README.md", - "//metadata": { - "constantPaths": [ - { - "path": "src/purviewDataMapClient.ts", - "prefix": "userAgentInfo" - } - ] + "scripts": { + "build": "npm run clean && dev-tool run build-package && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "build:samples": "echo skipped", + "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "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 vendored rimraf review && dev-tool run vendored mkdirp ./review && dev-tool run extract-api", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "generate:client": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "lint": "eslint package.json api-extractor.json src test", + "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]", + "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", + "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node && npm run integration-test:node", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "echo skipped" }, "browser": "./dist/browser/index.js", - "type": "module", - "tshy": { - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false, - "project": "./tsconfig.src.json" - }, + "react-native": "./dist/react-native/index.js", "exports": { "./package.json": "./package.json", ".": { @@ -128,5 +125,7 @@ "default": "./dist/commonjs/index.js" } } - } -} + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts" +} \ No newline at end of file diff --git a/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md b/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md index 8f8d0194d6c1..3fdf7f40665d 100644 --- a/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md +++ b/sdk/purview/purview-datamap-rest/review/purview-datamap.api.md @@ -6,10 +6,6 @@ import type { Client } from '@azure-rest/core-client'; import type { ClientOptions } from '@azure-rest/core-client'; -import { createFile } from '@azure/core-rest-pipeline'; -import { createFileFromStream } from '@azure/core-rest-pipeline'; -import { CreateFileFromStreamOptions } from '@azure/core-rest-pipeline'; -import { CreateFileOptions } from '@azure/core-rest-pipeline'; import type { HttpResponse } from '@azure-rest/core-client'; import type { RawHttpHeaders } from '@azure/core-rest-pipeline'; import type { RequestParameters } from '@azure-rest/core-client'; @@ -1011,9 +1007,6 @@ export interface AutoCompleteResultValueOutput { text?: string; } -// @public (undocumented) -export function buildMultiCollection(items: string[], parameterName: string): string; - // @public export interface BulkImportResultOutput { failedImportInfoList?: Array; @@ -1073,14 +1066,6 @@ export interface ContactSearchResultValueOutput { function createClient(endpointParam: string, credentials: TokenCredential, options?: PurviewDataMapClientOptions): PurviewDataMapClient; export default createClient; -export { createFile } - -export { createFileFromStream } - -export { CreateFileFromStreamOptions } - -export { CreateFileOptions } - // @public export interface DateFormat { availableLocales?: string[]; diff --git a/sdk/purview/purview-datamap-rest/sample.env b/sdk/purview/purview-datamap-rest/sample.env new file mode 100644 index 000000000000..508439fc7d62 --- /dev/null +++ b/sdk/purview/purview-datamap-rest/sample.env @@ -0,0 +1 @@ +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/purview/purview-datamap-rest/samples-dev/typedefs.ts b/sdk/purview/purview-datamap-rest/samples-dev/typedefs.ts deleted file mode 100644 index 3a5a3f419c02..000000000000 --- a/sdk/purview/purview-datamap-rest/samples-dev/typedefs.ts +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how get a list of typedefs - * - * @summary gets a list of typedefs for entities - * @azsdk-weight 40 - */ - -import PurviewDataMap from "@azure-rest/purview-datamap"; -import { DefaultAzureCredential } from "@azure/identity"; -import { isUnexpected } from "@azure-rest/purview-datamap"; -import "dotenv/config"; - -const endpoint = process.env["ENDPOINT"] || ""; - -async function main(): Promise { - console.log("== Get typedefs sample =="); - const client = PurviewDataMap(endpoint, new DefaultAzureCredential()); - - const result = await client.path("/atlas/v2/types/typedefs").get(); - - if (isUnexpected(result)) { - throw result; - } -} - -main().catch(console.error); diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/README.md b/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/README.md deleted file mode 100644 index 51328e3ed8a3..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# Azure Purview DataMap client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for Azure Purview DataMap in some common scenarios. - -| **File Name** | **Description** | -| ----------------------- | ------------------------------------ | -| [typedefs.js][typedefs] | gets a list of typedefs for entities | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node typedefs.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env ENDPOINT="" node typedefs.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[typedefs]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/typedefs.js -[apiref]: https://learn.microsoft.com/rest/api/purview/ -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/README.md diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/package.json b/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/package.json deleted file mode 100644 index fe6c46002803..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@azure-samples/purview-datamap-js-beta", - "private": true, - "version": "1.0.0", - "description": "Azure Purview DataMap client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/purview/purview-datamap-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest", - "dependencies": { - "@azure-rest/purview-datamap": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/sample.env b/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/sample.env deleted file mode 100644 index c515e60ef1d0..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,7 +0,0 @@ -# Purview DataMap endpoint -ENDPOINT=https://.purview.azure.com - -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/typedefs.js b/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/typedefs.js deleted file mode 100644 index dcb715eafad0..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/javascript/typedefs.js +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how get a list of typedefs - * - * @summary gets a list of typedefs for entities - */ - -const PurviewDataMap = require("@azure-rest/purview-datamap").default; -const { DefaultAzureCredential } = require("@azure/identity"); -const dotenv = require("dotenv"); -const { isUnexpected } = require("@azure-rest/purview-datamap"); - -dotenv.config(); - -const endpoint = process.env["ENDPOINT"] || ""; - -async function main() { - console.log("== Get typedefs sample =="); - const client = PurviewDataMap(endpoint, new DefaultAzureCredential()); - - const result = await client.path("/atlas/v2/types/typedefs").get(); - - if (isUnexpected(result)) { - throw result; - } -} - -main().catch(console.error); diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/README.md b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/README.md deleted file mode 100644 index 1403c1d8ef52..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# Azure Purview DataMap client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for Azure Purview DataMap in some common scenarios. - -| **File Name** | **Description** | -| ----------------------- | ------------------------------------ | -| [typedefs.ts][typedefs] | gets a list of typedefs for entities | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/typedefs.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env ENDPOINT="" node dist/typedefs.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[typedefs]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/src/typedefs.ts -[apiref]: https://learn.microsoft.com/rest/api/purview/ -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json deleted file mode 100644 index abbcd21aa124..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@azure-samples/purview-datamap-ts-beta", - "private": true, - "version": "1.0.0", - "description": "Azure Purview DataMap client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/purview/purview-datamap-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/purview/purview-datamap-rest", - "dependencies": { - "@azure-rest/purview-datamap": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.7.2", - "rimraf": "latest" - } -} diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/sample.env b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/sample.env deleted file mode 100644 index c515e60ef1d0..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,7 +0,0 @@ -# Purview DataMap endpoint -ENDPOINT=https://.purview.azure.com - -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/src/typedefs.ts b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/src/typedefs.ts deleted file mode 100644 index d2bb0f4bc313..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/src/typedefs.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -/** - * This sample demonstrates how get a list of typedefs - * - * @summary gets a list of typedefs for entities - */ - -import PurviewDataMap from "@azure-rest/purview-datamap"; -import { DefaultAzureCredential } from "@azure/identity"; -import dotenv from "dotenv"; -import { isUnexpected } from "@azure-rest/purview-datamap"; - -dotenv.config(); - -const endpoint = process.env["ENDPOINT"] || ""; - -async function main() { - console.log("== Get typedefs sample =="); - const client = PurviewDataMap(endpoint, new DefaultAzureCredential()); - - const result = await client.path("/atlas/v2/types/typedefs").get(); - - if (isUnexpected(result)) { - throw result; - } - -} - -main().catch(console.error); diff --git a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/tsconfig.json b/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/purview/purview-datamap-rest/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/purview/purview-datamap-rest/src/index.ts b/sdk/purview/purview-datamap-rest/src/index.ts index 4d4feb34039a..0cb9b4d236ad 100644 --- a/sdk/purview/purview-datamap-rest/src/index.ts +++ b/sdk/purview/purview-datamap-rest/src/index.ts @@ -10,12 +10,5 @@ export * from "./clientDefinitions.js"; export * from "./isUnexpected.js"; export * from "./models.js"; export * from "./outputModels.js"; -export * from "./serializeHelper.js"; -export { - createFile, - createFileFromStream, - type CreateFileOptions, - type CreateFileFromStreamOptions, -} from "@azure/core-rest-pipeline"; export default PurviewDataMapClient; diff --git a/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts b/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts index 6c45a462e527..97aee06bc756 100644 --- a/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts +++ b/sdk/purview/purview-datamap-rest/src/purviewDataMapClient.ts @@ -12,7 +12,7 @@ export interface PurviewDataMapClientOptions extends ClientOptions {} /** * Initialize a new instance of `PurviewDataMapClient` - * @param endpointParam - A sequence of textual characters. + * @param endpointParam - Represent a URL string as described by https://url.spec.whatwg.org/ * @param credentials - uniquely identify client credential * @param options - the parameter for all optional parameters */ diff --git a/sdk/purview/purview-datamap-rest/src/serializeHelper.ts b/sdk/purview/purview-datamap-rest/src/serializeHelper.ts deleted file mode 100644 index 593ee9fcc7ba..000000000000 --- a/sdk/purview/purview-datamap-rest/src/serializeHelper.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -export function buildMultiCollection(items: string[], parameterName: string): string { - return items - .map((item, index) => { - if (index === 0) { - return item; - } - return `${parameterName}=${item}`; - }) - .join("&"); -} diff --git a/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts b/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts deleted file mode 100644 index 8c58bd300339..000000000000 --- a/sdk/purview/purview-datamap-rest/test/public/entityTest.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder } from "@azure-tools/test-recorder"; -import { createRecorder } from "./utils/recordedClient.js"; -import { createClient } from "./utils/recordedClient.js"; -import { isUnexpected } from "../../src/isUnexpected.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -describe("purview datamap entity test", () => { - let recorder: Recorder; - - beforeEach(async (ctx) => { - recorder = await createRecorder(ctx); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - // TODO: Find out why this recording is missing - it("Import entity business metadata ", { skip: true }, async () => { - const client = await createClient(recorder); - const fileContent = new TextEncoder() - .encode(`TypeName,UniqueAttributeValue,BusinessAttributeName,BusinessAttributeValue,UniqueAttributeName[optional] -hive_database,hive_db_1,bmWithAllTypes.attr8,"Awesome Attribute 1",name`); - - const response = await client.path("/atlas/v2/entity/businessmetadata/import").post({ - contentType: "multipart/form-data", - body: [ - { - name: "file", - body: fileContent, - filename: "template_2.csv", - }, - ], - }); - assert.strictEqual(isUnexpected(response), false); - }); -}); diff --git a/sdk/purview/purview-datamap-rest/test/public/glossary.spec.ts b/sdk/purview/purview-datamap-rest/test/public/glossary.spec.ts deleted file mode 100644 index 2261149dada8..000000000000 --- a/sdk/purview/purview-datamap-rest/test/public/glossary.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder } from "@azure-tools/test-recorder"; -import { createRecorder } from "./utils/recordedClient.js"; -import { createClient } from "./utils/recordedClient.js"; -import { isUnexpected } from "../../src/isUnexpected.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -describe("purview datamap glossary test", () => { - let recorder: Recorder; - - beforeEach(async (ctx) => { - recorder = await createRecorder(ctx); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("Should get glossary", async () => { - const client = await createClient(recorder); - const result = await client.path("/atlas/v2/glossary").get(); - - assert.strictEqual(isUnexpected(result), false); - }); -}); diff --git a/sdk/purview/purview-datamap-rest/test/public/sampleTest.spec.ts b/sdk/purview/purview-datamap-rest/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..e4591bbad342 --- /dev/null +++ b/sdk/purview/purview-datamap-rest/test/public/sampleTest.spec.ts @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert, beforeEach, afterEach, it, describe } from "vitest"; + +describe("My test", () => { + // let recorder: Recorder; + + beforeEach(async () => { + // recorder = await createRecorder(this); + }); + + afterEach(async () => { + // await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/purview/purview-datamap-rest/test/public/typedefs.spec.ts b/sdk/purview/purview-datamap-rest/test/public/typedefs.spec.ts deleted file mode 100644 index a8968d8a05fb..000000000000 --- a/sdk/purview/purview-datamap-rest/test/public/typedefs.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import type { Recorder } from "@azure-tools/test-recorder"; -import { createClient } from "./utils/recordedClient.js"; -import { createRecorder } from "./utils/recordedClient.js"; -import { isUnexpected } from "../../src/isUnexpected.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -describe("purview datamap typedefs test", () => { - let recorder: Recorder; - - beforeEach(async (ctx) => { - recorder = await createRecorder(ctx); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("should list all available typedefs sources", async () => { - const client = await createClient(recorder); - const result = await client.path("/atlas/v2/types/typedefs").get(); - - assert.strictEqual(isUnexpected(result), false); - }); -}); diff --git a/sdk/purview/purview-datamap-rest/test/public/utils/env-browser.mts b/sdk/purview/purview-datamap-rest/test/public/utils/env-browser.mts deleted file mode 100644 index fc36ab244fad..000000000000 --- a/sdk/purview/purview-datamap-rest/test/public/utils/env-browser.mts +++ /dev/null @@ -1,2 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. diff --git a/sdk/purview/purview-datamap-rest/test/public/utils/env.ts b/sdk/purview/purview-datamap-rest/test/public/utils/env.ts deleted file mode 100644 index 54ee1e71af77..000000000000 --- a/sdk/purview/purview-datamap-rest/test/public/utils/env.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import "dotenv/config"; diff --git a/sdk/purview/purview-datamap-rest/test/public/utils/recordedClient.ts b/sdk/purview/purview-datamap-rest/test/public/utils/recordedClient.ts index 5ecd870763ec..14dcd9fa397c 100644 --- a/sdk/purview/purview-datamap-rest/test/public/utils/recordedClient.ts +++ b/sdk/purview/purview-datamap-rest/test/public/utils/recordedClient.ts @@ -1,23 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import type { PurviewDataMapClient } from "../../../src/index.js"; -import PurviewDataMap from "../../../src/index.js"; -import type { RecorderStartOptions, TestInfo } from "@azure-tools/test-recorder"; -import { env, Recorder } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import "./env.js"; -import type { ClientOptions } from "@azure-rest/core-client"; -const envSetupForPlayback: Record = { - ENDPOINT: "https://fakeAccount.purview.azure.com/", - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", +import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; + +const replaceableVariables: Record = { SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderEnvSetup: RecorderStartOptions = { - envSetupForPlayback, + envSetupForPlayback: replaceableVariables, }; /** @@ -25,23 +16,8 @@ const recorderEnvSetup: RecorderStartOptions = { * Should be called first in the test suite to make sure environment variables are * read before they are being used. */ -export async function createRecorder(context: TestInfo): Promise { +export async function createRecorder(context: VitestTestContext): Promise { const recorder = new Recorder(context); await recorder.start(recorderEnvSetup); return recorder; } - -export async function createClient( - recorder: Recorder, - options?: ClientOptions, -): Promise { - const credential = createTestCredential(); - - return PurviewDataMap( - env.ENDPOINT ?? "", - credential, - recorder.configureClientOptions({ - options, - }), - ); -} diff --git a/sdk/purview/purview-datamap-rest/tsconfig.json b/sdk/purview/purview-datamap-rest/tsconfig.json index 7cf93e34294e..71858ab903e4 100644 --- a/sdk/purview/purview-datamap-rest/tsconfig.json +++ b/sdk/purview/purview-datamap-rest/tsconfig.json @@ -1,14 +1,16 @@ { - "references": [ - { - "path": "./tsconfig.src.json" - }, - { - "path": "./tsconfig.samples.json" - }, - { - "path": "./tsconfig.test.json" - } - ], - "files": [] -} + "extends": "../../../tsconfig", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "rootDir": ".", + "skipLibCheck": true + }, + "include": [ + "src/**/*.ts", + "src/**/*.mts", + "src/**/*.cts", + "test/**/*.ts", + "test/**/*.ts" + ] +} \ No newline at end of file diff --git a/sdk/purview/purview-datamap-rest/tsp-location.yaml b/sdk/purview/purview-datamap-rest/tsp-location.yaml index 7f50fab51b20..1a12bd43476a 100644 --- a/sdk/purview/purview-datamap-rest/tsp-location.yaml +++ b/sdk/purview/purview-datamap-rest/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/purview/Azure.Analytics.Purview.DataMap -commit: b9d42131fa23babd959c491b44870a30ea9506cd -repo: Azure/azure-rest-api-specs +commit: aa9a17bbde9fcab9214172381c6000bc91763c0a +repo: /mnt/vss/_work/1/s/azure-rest-api-specs additionalDirectories: diff --git a/sdk/purview/purview-datamap-rest/vitest.browser.config.ts b/sdk/purview/purview-datamap-rest/vitest.browser.config.ts index 50ec2d5489b0..182729ab5ce9 100644 --- a/sdk/purview/purview-datamap-rest/vitest.browser.config.ts +++ b/sdk/purview/purview-datamap-rest/vitest.browser.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,9 +9,9 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - include: ["dist-test/browser/test/**/*.spec.js"], - hookTimeout: 5000000, - testTimeout: 5000000, + include: ["dist-test/browser/test/**/*.spec.js",], + testTimeout: 1200000, + hookTimeout: 1200000, }, }), ); diff --git a/sdk/purview/purview-datamap-rest/vitest.config.ts b/sdk/purview/purview-datamap-rest/vitest.config.ts index 8849d7428190..40e031385dd8 100644 --- a/sdk/purview/purview-datamap-rest/vitest.config.ts +++ b/sdk/purview/purview-datamap-rest/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,8 +9,8 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - hookTimeout: 5000000, - testTimeout: 5000000, + testTimeout: 1200000, + hookTimeout: 1200000, }, }), ); diff --git a/sdk/purview/purview-datamap-rest/vitest.esm.config.ts b/sdk/purview/purview-datamap-rest/vitest.esm.config.ts index 2f6e757a54f7..a70127279fc9 100644 --- a/sdk/purview/purview-datamap-rest/vitest.esm.config.ts +++ b/sdk/purview/purview-datamap-rest/vitest.esm.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License.