diff --git a/packages/http-client-python/eng/scripts/Test-Packages.ps1 b/packages/http-client-python/eng/scripts/Test-Packages.ps1 index 0df7f33952..a5fba247cd 100644 --- a/packages/http-client-python/eng/scripts/Test-Packages.ps1 +++ b/packages/http-client-python/eng/scripts/Test-Packages.ps1 @@ -56,7 +56,7 @@ try { Write-Host 'tox tests passed' } catch { - Write-Error "Cadl ranch tests failed: $_" + Write-Error "Spector tests failed: $_" } } } diff --git a/packages/http-client-python/eng/scripts/ci/regenerate.ts b/packages/http-client-python/eng/scripts/ci/regenerate.ts index 629c29c411..44ea82439a 100644 --- a/packages/http-client-python/eng/scripts/ci/regenerate.ts +++ b/packages/http-client-python/eng/scripts/ci/regenerate.ts @@ -26,7 +26,8 @@ const exec = promisify(execCallback); const PLUGIN_DIR = argv.values.pluginDir ? resolve(argv.values.pluginDir) : resolve(fileURLToPath(import.meta.url), "../../../../"); -const CADL_RANCH_DIR = resolve(PLUGIN_DIR, "node_modules/@azure-tools/cadl-ranch-specs/http"); +const AZURE_HTTP_SPECS = resolve(PLUGIN_DIR, "node_modules/@azure-tools/azure-http-specs/specs"); +const HTTP_SPECS = resolve(PLUGIN_DIR, "node_modules/@typespec/http-specs/specs"); const GENERATED_FOLDER = argv.values.generatedFolder ? resolve(argv.values.generatedFolder) : resolve(PLUGIN_DIR, "generator"); @@ -128,7 +129,8 @@ function toPosix(dir: string): string { } function getEmitterOption(spec: string): Record[] { - const relativeSpec = toPosix(relative(CADL_RANCH_DIR, spec)); + const specDir = spec.includes("azure") ? AZURE_HTTP_SPECS : HTTP_SPECS; + const relativeSpec = toPosix(relative(specDir, spec)); const key = relativeSpec.includes("resiliency/srv-driven/old.tsp") ? relativeSpec : dirname(relativeSpec); @@ -224,7 +226,8 @@ async function getSubdirectories(baseDir: string, flags: RegenerateFlags): Promi } function defaultPackageName(spec: string): string { - return toPosix(relative(CADL_RANCH_DIR, dirname(spec))) + const specDir = spec.includes("azure") ? AZURE_HTTP_SPECS : HTTP_SPECS; + return toPosix(relative(specDir, dirname(spec))) .replace(/\//g, "-") .toLowerCase(); } @@ -284,8 +287,9 @@ async function regenerate(flags: RegenerateFlagsInput): Promise { await regenerate({ ...flags, flavor: "unbranded" }); } else { const flagsResolved = { debug: false, flavor: flags.flavor, ...flags }; - const CADL_RANCH_DIR = resolve(PLUGIN_DIR, "node_modules/@azure-tools/cadl-ranch-specs/http"); - const subdirectories = await getSubdirectories(CADL_RANCH_DIR, flagsResolved); + const subdirectoriesForAzure = await getSubdirectories(AZURE_HTTP_SPECS, flagsResolved); + const subdirectoriesForNonAzure = await getSubdirectories(HTTP_SPECS, flagsResolved); + const subdirectories = [...subdirectoriesForAzure, ...subdirectoriesForNonAzure]; const cmdList: TspCommand[] = subdirectories.flatMap((subdirectory) => _getCmdList(subdirectory, flagsResolved), ); diff --git a/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py index 2ff5d0af0e..fe2f64f13d 100644 --- a/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py @@ -19,7 +19,7 @@ async def client(): yield client -# ========== test for cadl-ranch ========== +# ========== test for spector ========== @pytest.mark.asyncio diff --git a/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_payload_pageable_async.py similarity index 91% rename from packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_payload_pageable_async.py index b3b9c57c80..440a4a5117 100644 --- a/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_payload_pageable_async.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- import pytest -from payload.pageable.aio import PageableClient +from specs.azure.payload.pageable.aio import PageableClient @pytest.fixture diff --git a/packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py b/packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py index 8a69a01a4a..e14a212a7a 100644 --- a/packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py @@ -13,9 +13,10 @@ def start_server_process(): - path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@azure-tools/cadl-ranch-specs") - os.chdir(path.resolve()) - cmd = "cadl-ranch serve ./http --coverageFile ./cadl-ranch-coverage-python-standard.json" + azure_http_path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@azure-tools/azure-http-specs") + http_path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@typespec/http-specs") + os.chdir(azure_http_path.resolve()) + cmd = f"tsp-spector serve ./specs {(http_path / 'specs').resolve()}" if os.name == "nt": return subprocess.Popen(cmd, shell=True) return subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid) @@ -30,7 +31,7 @@ def terminate_server_process(process): @pytest.fixture(scope="session", autouse=True) def testserver(): - """Start cadl ranch mock api tests""" + """Start spector ranch mock api tests""" server = start_server_process() yield terminate_server_process(server) diff --git a/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py index 366498d265..b1492f524a 100644 --- a/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py @@ -19,7 +19,7 @@ def client(): yield client -# ========== test for cadl-ranch ========== +# ========== test for spector ========== def test_put_flatten_model(client: FlattenPropertyClient): diff --git a/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_pageable.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_payload_pageable.py similarity index 90% rename from packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_pageable.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_payload_pageable.py index a13109a38c..e846ae434c 100644 --- a/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_pageable.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_payload_pageable.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- import pytest -from payload.pageable import PageableClient +from specs.azure.payload.pageable import PageableClient @pytest.fixture diff --git a/packages/http-client-python/generator/test/azure/requirements.txt b/packages/http-client-python/generator/test/azure/requirements.txt index 56fb69745d..42037b9840 100644 --- a/packages/http-client-python/generator/test/azure/requirements.txt +++ b/packages/http-client-python/generator/test/azure/requirements.txt @@ -24,6 +24,7 @@ mypy==1.13.0 -e ./generated/azure-example-basic -e ./generated/azure-resource-manager-common-properties -e ./generated/azure-resource-manager-resources +-e ./generated/azure-payload-pageable # common test case -e ./generated/authentication-api-key diff --git a/packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py b/packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py index 66c960658a..659290f9f9 100644 --- a/packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py +++ b/packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py @@ -15,9 +15,10 @@ def start_server_process(): - path = Path(os.path.dirname(__file__)) / Path("../../../node_modules/@azure-tools/cadl-ranch-specs") - os.chdir(path.resolve()) - cmd = "cadl-ranch serve ./http" + azure_http_path = Path(os.path.dirname(__file__)) / Path("../../../node_modules/@azure-tools/azure-http-specs") + http_path = Path(os.path.dirname(__file__)) / Path("../../../node_modules/@typespec/http-specs") + os.chdir(azure_http_path.resolve()) + cmd = f"tsp-spector serve ./specs {(http_path / 'specs').resolve()}" if os.name == "nt": return subprocess.Popen(cmd, shell=True) return subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid) @@ -32,7 +33,7 @@ def terminate_server_process(process): @pytest.fixture(scope="session", autouse=True) def testserver(): - """Start cadl ranch mock api tests""" + """Start spector mock api tests""" server = start_server_process() yield terminate_server_process(server) diff --git a/packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py b/packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py index ee92b7c6d8..423aaf4686 100644 --- a/packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py +++ b/packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py @@ -12,9 +12,10 @@ def start_server_process(): - path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@azure-tools/cadl-ranch-specs") - os.chdir(path.resolve()) - cmd = "cadl-ranch serve ./http" + azure_http_path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@azure-tools/azure-http-specs") + http_path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@typespec/http-specs") + os.chdir(azure_http_path.resolve()) + cmd = f"tsp-spector serve ./specs {(http_path / 'specs').resolve()}" if os.name == "nt": return subprocess.Popen(cmd, shell=True) return subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid) @@ -29,7 +30,7 @@ def terminate_server_process(process): @pytest.fixture(scope="session", autouse=True) def testserver(): - """Start cadl ranch mock api tests""" + """Start spector mock api tests""" server = start_server_process() yield terminate_server_process(server) diff --git a/packages/http-client-python/generator/test/unbranded/mock_api_tests/test_unbranded.py b/packages/http-client-python/generator/test/unbranded/mock_api_tests/test_unbranded.py index 10ded3a218..1f52da5d0f 100644 --- a/packages/http-client-python/generator/test/unbranded/mock_api_tests/test_unbranded.py +++ b/packages/http-client-python/generator/test/unbranded/mock_api_tests/test_unbranded.py @@ -53,5 +53,5 @@ def check_sensitive_word(folder: Path, word: str) -> str: def test_sensitive_word(): check_folder = (Path(os.path.dirname(__file__)) / "../generated").resolve() assert [] == check_sensitive_word(check_folder, "azure") - # after update cadl-ranch, it shall also equal to [] + # after update spector, it shall also equal to [] assert ["authentication-oauth2", "authentication-union"] == check_sensitive_word(check_folder, "microsoft") diff --git a/packages/http-client-python/package-lock.json b/packages/http-client-python/package-lock.json index f2351a2db2..437aff4e58 100644 --- a/packages/http-client-python/package-lock.json +++ b/packages/http-client-python/package-lock.json @@ -15,9 +15,7 @@ "tsx": "~4.19.1" }, "devDependencies": { - "@azure-tools/cadl-ranch": "~0.16.2", - "@azure-tools/cadl-ranch-expect": "~0.15.7", - "@azure-tools/cadl-ranch-specs": "~0.39.6", + "@azure-tools/azure-http-specs": "0.1.0-alpha.4", "@azure-tools/typespec-autorest": "~0.49.0", "@azure-tools/typespec-azure-core": "~0.49.0", "@azure-tools/typespec-azure-resource-manager": "~0.49.0", @@ -28,6 +26,7 @@ "@types/semver": "7.5.8", "@typespec/compiler": "~0.63.0", "@typespec/http": "~0.63.0", + "@typespec/http-specs": "0.1.0-alpha.5", "@typespec/openapi": "~0.63.0", "@typespec/rest": "~0.63.0", "@typespec/versioning": "~0.63.0", @@ -54,112 +53,19 @@ "@typespec/versioning": ">=0.63.0 <1.0.0" } }, - "node_modules/@azure-tools/cadl-ranch": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch/-/cadl-ranch-0.16.2.tgz", - "integrity": "sha512-1FtmiOp89qo3Jj2Gq6hTq23paolHocxNoBIugZPcEPY0ZNwOe+Ea24D0v0e3gd6RbomRKfKbmr3UVodN/xWLQA==", + "node_modules/@azure-tools/azure-http-specs": { + "version": "0.1.0-alpha.4", + "resolved": "https://registry.npmjs.org/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.4.tgz", + "integrity": "sha512-kXjUnGU0yW3RYU22D+KCliDcnUjhkfX0MSZT0Xi7OBfJqEtD1ONyfUVVtUt5QYpRQH/8oazL96SRZ0XAz6Zaew==", "dev": true, "dependencies": { - "@azure-tools/cadl-ranch-api": "~0.5.0", - "@azure-tools/cadl-ranch-coverage-sdk": "~0.9.0", - "@azure-tools/cadl-ranch-expect": "~0.15.7", - "@azure/identity": "^4.4.1", - "@types/js-yaml": "^4.0.5", - "@typespec/compiler": "~0.63.0", - "@typespec/http": "~0.63.0", - "@typespec/rest": "~0.63.0", - "ajv": "8.17.1", - "axios": "^1.7.5", - "body-parser": "^1.20.3", - "deep-equal": "^2.2.0", - "express": "^4.20.0", - "express-promise-router": "^4.1.1", - "form-data": "^3.0.1", - "glob": "^11.0.0", - "jackspeak": "4.0.1", - "js-yaml": "^4.1.0", - "morgan": "^1.10.0", - "multer": "^1.4.5-lts.1", - "node-fetch": "^3.3.1", - "picocolors": "^1.0.0", - "source-map-support": "^0.5.21", - "winston": "^3.14.0", - "xml2js": "^0.6.2", - "yargs": "^17.7.1" - }, - "bin": { - "cadl-ranch": "cmd/cli.mjs" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch-api": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-api/-/cadl-ranch-api-0.5.0.tgz", - "integrity": "sha512-awgLMCWGy4VxIJ5n9SJuTH0WfZFsUv5kYffIYfvGPtV3NIkCwO1u39Polb4BBR8GLELWjRuHMxYsmhwpTzRBpw==", - "dev": true, - "dependencies": { - "body-parser": "^1.20.3", - "deep-equal": "^2.2.0", - "express": "^4.20.0", - "express-promise-router": "^4.1.1", - "glob": "^11.0.0", - "morgan": "^1.10.0", - "multer": "^1.4.5-lts.1", - "picocolors": "^1.0.0", - "winston": "^3.14.0", - "xml-formatter": "^3.6.3", - "xml2js": "^0.6.2", - "yargs": "^17.7.1" + "@typespec/spec-api": "~0.1.0-alpha.0", + "@typespec/spector": "~0.1.0-alpha.5" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch-coverage-sdk": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-coverage-sdk/-/cadl-ranch-coverage-sdk-0.9.0.tgz", - "integrity": "sha512-u4WU5U6Ps6oct9E3FiBdORMsSiqpV1VBFeiqH4ZTXCV3A245n3GzznRexZ5bDuRlRY4ea2BVvKrVnemaYaLp+w==", - "dev": true, - "dependencies": { - "@azure/identity": "^4.4.1", - "@azure/storage-blob": "^12.24.0", - "@types/node": "^22.1.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@azure-tools/cadl-ranch-expect": { - "version": "0.15.7", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-expect/-/cadl-ranch-expect-0.15.7.tgz", - "integrity": "sha512-3f6PLUn4vVyiKOTnqdxppHhpQ3chb2D6ZMI7w65Xf5DYByyqC/rnMU25AjUu1jiIKwwANDtd6UDX6pWQrj87vQ==", - "dev": true, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@typespec/compiler": "~0.63.0", - "@typespec/http": "~0.63.0", - "@typespec/rest": "~0.63.0", - "@typespec/versioning": "~0.63.0" - } - }, - "node_modules/@azure-tools/cadl-ranch-specs": { - "version": "0.39.6", - "resolved": "https://registry.npmjs.org/@azure-tools/cadl-ranch-specs/-/cadl-ranch-specs-0.39.6.tgz", - "integrity": "sha512-oa8CDSVZhpO8xwjxLjgAa8ppyBel/QCCw9DjAd6sdj/VumJq+Bzcj9wKly0Vy4RFqdPSxPMdCcjlED63Xb1+YQ==", - "dev": true, - "dependencies": { - "@azure-tools/cadl-ranch": "~0.16.2", - "@azure-tools/cadl-ranch-api": "~0.5.0" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/cadl-ranch-expect": "~0.15.7", "@azure-tools/typespec-azure-core": "~0.49.0", "@typespec/compiler": "~0.63.0", "@typespec/http": "~0.63.0", @@ -401,31 +307,6 @@ "node": ">=18.0.0" } }, - "node_modules/@azure/identity": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.5.0.tgz", - "integrity": "sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-rest-pipeline": "^1.17.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.11.0", - "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^3.26.1", - "@azure/msal-node": "^2.15.0", - "events": "^3.0.0", - "jws": "^4.0.0", - "open": "^8.0.0", - "stoppable": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@azure/logger": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.1.4.tgz", @@ -473,30 +354,6 @@ "node": ">=16" } }, - "node_modules/@azure/storage-blob": { - "version": "12.26.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.26.0.tgz", - "integrity": "sha512-SriLPKezypIsiZ+TtlFfE46uuBIap2HeaQVS78e1P7rz5OSbq0rsd52WE1mC5f7vAeLiXqv7I7oRhL3WFZEw3Q==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.4.0", - "@azure/core-client": "^1.6.2", - "@azure/core-http-compat": "^2.0.0", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-rest-pipeline": "^1.10.1", - "@azure/core-tracing": "^1.1.2", - "@azure/core-util": "^1.6.1", - "@azure/core-xml": "^1.4.3", - "@azure/logger": "^1.0.0", - "events": "^3.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.25.9", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.9.tgz", @@ -1956,6 +1813,26 @@ } } }, + "node_modules/@typespec/http-specs": { + "version": "0.1.0-alpha.5", + "resolved": "https://registry.npmjs.org/@typespec/http-specs/-/http-specs-0.1.0-alpha.5.tgz", + "integrity": "sha512-2bOsxnzXPAW2S+gMiu6c/TAmimIBs5MPiFETSFNvsSRJZ+b9Smg+4nHW+6iZGVcVskjYAU97WHccGkNL3lwIVg==", + "dev": true, + "dependencies": { + "@typespec/spec-api": "~0.1.0-alpha.0", + "@typespec/spector": "~0.1.0-alpha.5" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@typespec/compiler": "~0.63.0", + "@typespec/http": "~0.63.0", + "@typespec/rest": "~0.63.0", + "@typespec/versioning": "~0.63.0", + "@typespec/xml": "~0.63.0" + } + }, "node_modules/@typespec/openapi": { "version": "0.63.0", "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.63.0.tgz", @@ -1982,6 +1859,218 @@ "@typespec/http": "~0.63.0" } }, + "node_modules/@typespec/spec-api": { + "version": "0.1.0-alpha.0", + "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.0.tgz", + "integrity": "sha512-SgWSt5mnl9bbc+C9toMzh4i8RESWcAfMg/Wyq+3oY+0EcKlmDYNWgDhQi/Eh8bA4zyMoymj48hcEzD97E1ERtQ==", + "dev": true, + "dependencies": { + "body-parser": "^1.20.3", + "deep-equal": "^2.2.0", + "express": "^4.21.1", + "express-promise-router": "^4.1.1", + "morgan": "^1.10.0", + "multer": "^1.4.5-lts.1", + "picocolors": "~1.1.0", + "prettier": "~3.3.3", + "winston": "^3.15.0", + "xml2js": "^0.6.2", + "yargs": "~17.7.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@typespec/spec-coverage-sdk": { + "version": "0.1.0-alpha.2", + "resolved": "https://registry.npmjs.org/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.2.tgz", + "integrity": "sha512-bdU5K6jZ12+wEH4b7I7aiytIJu2M+tAigoxxc9Tz7UrucbA5PZqgO+uFoqMKRYcmNjwC4EmvEIVmyzNEKUzUmA==", + "dev": true, + "dependencies": { + "@azure/identity": "~4.4.1", + "@azure/storage-blob": "~12.25.0", + "@types/node": "~22.7.9" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@typespec/spec-coverage-sdk/node_modules/@azure/identity": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.4.1.tgz", + "integrity": "sha512-DwnG4cKFEM7S3T+9u05NstXU/HN0dk45kPOinUyNKsn5VWwpXd9sbPKEg6kgJzGbm1lMuhx9o31PVbCtM5sfBA==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.5.0", + "@azure/core-client": "^1.9.2", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.3.0", + "@azure/logger": "^1.0.0", + "@azure/msal-browser": "^3.14.0", + "@azure/msal-node": "^2.9.2", + "events": "^3.0.0", + "jws": "^4.0.0", + "open": "^8.0.0", + "stoppable": "^1.1.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@typespec/spec-coverage-sdk/node_modules/@azure/identity/node_modules/@azure/abort-controller": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", + "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", + "dev": true, + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@typespec/spec-coverage-sdk/node_modules/@azure/storage-blob": { + "version": "12.25.0", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.25.0.tgz", + "integrity": "sha512-oodouhA3nCCIh843tMMbxty3WqfNT+Vgzj3Xo5jqR9UPnzq3d7mzLjlHAYz7lW+b4km3SIgz+NAgztvhm7Z6kQ==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.4.0", + "@azure/core-client": "^1.6.2", + "@azure/core-http-compat": "^2.0.0", + "@azure/core-lro": "^2.2.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-rest-pipeline": "^1.10.1", + "@azure/core-tracing": "^1.1.2", + "@azure/core-util": "^1.6.1", + "@azure/core-xml": "^1.4.3", + "@azure/logger": "^1.0.0", + "events": "^3.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@typespec/spec-coverage-sdk/node_modules/@types/node": { + "version": "22.7.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.9.tgz", + "integrity": "sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@typespec/spector": { + "version": "0.1.0-alpha.5", + "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.5.tgz", + "integrity": "sha512-HV6fZkQFy/0IrPiySyCzYraESlWsNhp04Azf9Ss6a63Bjkw6ZQoxz4YvzH4fLvlmo1zFPxOYFXul+JZZw81TtQ==", + "dev": true, + "dependencies": { + "@azure/identity": "~4.4.1", + "@types/js-yaml": "^4.0.5", + "@typespec/compiler": "~0.63.0", + "@typespec/http": "~0.63.0", + "@typespec/rest": "~0.63.0", + "@typespec/spec-api": "~0.1.0-alpha.0", + "@typespec/spec-coverage-sdk": "~0.1.0-alpha.2", + "@typespec/versioning": "~0.63.0", + "ajv": "~8.17.1", + "axios": "^1.7.5", + "body-parser": "^1.20.3", + "deep-equal": "^2.2.0", + "express": "^4.21.1", + "express-promise-router": "^4.1.1", + "form-data": "^4.0.1", + "globby": "~14.0.2", + "jackspeak": "4.0.2", + "js-yaml": "^4.1.0", + "morgan": "^1.10.0", + "multer": "^1.4.5-lts.1", + "node-fetch": "^3.3.1", + "picocolors": "~1.1.1", + "source-map-support": "~0.5.21", + "winston": "^3.15.0", + "xml2js": "^0.6.2", + "yargs": "~17.7.2" + }, + "bin": { + "tsp-spector": "cmd/cli.mjs" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@typespec/spector/node_modules/@azure/abort-controller": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", + "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", + "dev": true, + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@typespec/spector/node_modules/@azure/identity": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.4.1.tgz", + "integrity": "sha512-DwnG4cKFEM7S3T+9u05NstXU/HN0dk45kPOinUyNKsn5VWwpXd9sbPKEg6kgJzGbm1lMuhx9o31PVbCtM5sfBA==", + "dev": true, + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.5.0", + "@azure/core-client": "^1.9.2", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.3.0", + "@azure/logger": "^1.0.0", + "@azure/msal-browser": "^3.14.0", + "@azure/msal-node": "^2.9.2", + "events": "^3.0.0", + "jws": "^4.0.0", + "open": "^8.0.0", + "stoppable": "^1.1.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@typespec/spector/node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@typespec/spector/node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typespec/versioning": { "version": "0.63.0", "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.63.0.tgz", @@ -3704,20 +3793,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/form-data": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.2.tgz", - "integrity": "sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -7540,27 +7615,6 @@ "node": ">=8" } }, - "node_modules/xml-formatter": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/xml-formatter/-/xml-formatter-3.6.3.tgz", - "integrity": "sha512-++x1TlRO1FRlQ82AZ4WnoCSufaI/PT/sycn4K8nRl4gnrNC1uYY2VV/67aALZ2m0Q4Q/BLj/L69K360Itw9NNg==", - "dev": true, - "dependencies": { - "xml-parser-xo": "^4.1.2" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/xml-parser-xo": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/xml-parser-xo/-/xml-parser-xo-4.1.2.tgz", - "integrity": "sha512-Z/DRB0ZAKj5vAQg++XsfQQKfT73Vfj5n5lKIVXobBDQEva6NHWUTxOA6OohJmEcpoy8AEqBmSGkXXAnFwt5qAA==", - "dev": true, - "engines": { - "node": ">= 16" - } - }, "node_modules/xml2js": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index fe2a0768b9..b29fb2836d 100644 --- a/packages/http-client-python/package.json +++ b/packages/http-client-python/package.json @@ -78,9 +78,8 @@ "@azure-tools/typespec-azure-rulesets": "~0.49.0", "@azure-tools/typespec-azure-resource-manager": "~0.49.0", "@azure-tools/typespec-client-generator-core": "~0.49.0", - "@azure-tools/cadl-ranch-specs": "~0.39.6", - "@azure-tools/cadl-ranch-expect": "~0.15.7", - "@azure-tools/cadl-ranch": "~0.16.2", + "@azure-tools/azure-http-specs": "0.1.0-alpha.4", + "@typespec/http-specs": "0.1.0-alpha.5", "@types/js-yaml": "~4.0.5", "@types/node": "~22.5.4", "@types/semver": "7.5.8",