From e388b1eec0122a9391d5e5a904992a88cf6b2f3d Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 27 Aug 2024 20:58:55 +0900 Subject: [PATCH] Enhance CLI setup command. --- packages/cli/package.json | 2 +- packages/cli/src/internal/ArgumentParser.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 8dc67eed5..0995c6af5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "nestia", - "version": "5.7.0", + "version": "5.8.0-dev.20240827-2", "description": "Nestia CLI tool", "main": "bin/index.js", "bin": { diff --git a/packages/cli/src/internal/ArgumentParser.ts b/packages/cli/src/internal/ArgumentParser.ts index 5415f2fa6..7f5d7c7f1 100644 --- a/packages/cli/src/internal/ArgumentParser.ts +++ b/packages/cli/src/internal/ArgumentParser.ts @@ -95,10 +95,12 @@ export namespace ArgumentParser { ); pack.manager = options.manager; options.project ??= await configure(); - options.swagger = options.swagger - ? (options.swagger as any) === "true" - : (await select("swagger")("Transform Runtime Swagger")(["Y", "N"])) === - "Y"; + options.swagger = + ((options.swagger as string | undefined) ?? + (await select("swagger")("Transform Runtime Swagger")([ + "true", + "false", + ]))) === "true"; if (questioned.value) console.log(""); return options as IArguments;