[tsp-client] Miscellaneous fixes (#8825)
* tsp-client improvements * fix version range for typespec-autorest * changelog * changelog update --------- Co-authored-by: Catalina Peralta <caperal@microsoft.com>
This commit is contained in:
Родитель
6e8d78eb8d
Коммит
07327018c3
|
@ -4,6 +4,8 @@
|
|||
|
||||
- Fix `--version` flag. (#8814)
|
||||
- Added `compare` command to compare a hand-authored Swagger to a TypeSpec-generated Swagger to understand the relevant differences between them.
|
||||
- Floating `@azure-tools/typespec-autorest` dependency from `>=0.44.0 <1.0.0`.
|
||||
- Bump `@autorest/openapi-to-typespec` dependency to `0.9.0`.
|
||||
|
||||
## 2024-08-08 - 0.11.1
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"@autorest/csharp": "https://aka.ms/azsdk/openapi-to-typespec-csharp",
|
||||
"@autorest/openapi-to-typespec": "0.9.0",
|
||||
"@azure-tools/rest-api-diff": "^0.1.0",
|
||||
"@azure-tools/typespec-autorest": "^0.44.0",
|
||||
"@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0",
|
||||
"@azure/core-rest-pipeline": "^1.12.0",
|
||||
"@types/yargs": "^17.0.32",
|
||||
"autorest": "^3.7.1",
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
"dependencies": {
|
||||
"@autorest/csharp": "https://aka.ms/azsdk/openapi-to-typespec-csharp",
|
||||
"@autorest/openapi-to-typespec": "0.9.0",
|
||||
"@azure-tools/typespec-autorest": "^0.44.0",
|
||||
"@azure-tools/typespec-autorest": ">=0.44.0 <1.0.0",
|
||||
"@azure/core-rest-pipeline": "^1.12.0",
|
||||
"@azure-tools/rest-api-diff": "^0.1.0",
|
||||
"@types/yargs": "^17.0.32",
|
||||
|
|
|
@ -19,12 +19,12 @@ import { dirname } from "path";
|
|||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const { version } = JSON.parse(await readFile(joinPaths(__dirname, "..", "package.json"), "utf8"));
|
||||
const packageJson = JSON.parse(await readFile(joinPaths(__dirname, "..", "package.json"), "utf8"));
|
||||
|
||||
function commandPreamble(argv: any) {
|
||||
checkDebugLogging(argv);
|
||||
printBanner();
|
||||
yargs().showVersion();
|
||||
Logger.info(packageJson.version);
|
||||
}
|
||||
|
||||
/** Ensure the output directory exists and allow interactive users to confirm or override the value. */
|
||||
|
@ -57,7 +57,7 @@ export function resolveOutputDir(argv: any): string {
|
|||
}
|
||||
|
||||
const parser = yargs(hideBin(process.argv))
|
||||
.version(version)
|
||||
.version(packageJson.version)
|
||||
.alias("v", "version")
|
||||
.scriptName("")
|
||||
.usage(usageText)
|
||||
|
@ -225,6 +225,7 @@ const parser = yargs(hideBin(process.argv))
|
|||
});
|
||||
},
|
||||
async (argv: any) => {
|
||||
commandPreamble(argv);
|
||||
await sortSwaggerCommand(argv);
|
||||
},
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче