From 132cd9167fcba87413dcc0be7f340db169ae1cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20APLAK?= Date: Fri, 18 Nov 2022 12:11:10 +0300 Subject: [PATCH] fix: telemetry question --- package.json | 2 +- src/Helper/source/index.ts | 1 - src/Helper/telemetry/index.ts | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 4a2dddd2..a9a0af94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superplate-cli", - "version": "1.9.1", + "version": "1.9.2", "description": "The frontend boilerplate with superpowers", "license": "MIT", "repository": { diff --git a/src/Helper/source/index.ts b/src/Helper/source/index.ts index ce27c251..140c88bc 100644 --- a/src/Helper/source/index.ts +++ b/src/Helper/source/index.ts @@ -137,7 +137,6 @@ export const prompt_project_types = async ( })), }); - console.log({ response }); projectType = (response as { projectType: string }).projectType; } diff --git a/src/Helper/telemetry/index.ts b/src/Helper/telemetry/index.ts index f8ccbb31..36fe591c 100644 --- a/src/Helper/telemetry/index.ts +++ b/src/Helper/telemetry/index.ts @@ -1,20 +1,20 @@ -import prompts from "prompts"; +import { prompt } from "enquirer"; export const prompt_telemetry = async (): Promise<{ telemetry: "yes" | "no"; }> => { - const result = await prompts({ + const result = await prompt({ type: "select", name: "telemetry", message: "Would you like to share your choices with us anonymously?", choices: [ { - title: "I want to share anonymously! Thank you! ❤️", - value: "yes", + message: "I want to share anonymously! Thank you! ❤️", + name: "yes", }, - { title: "No", value: "no" }, + { message: "No", name: "no" }, ], }); - return result; + return result as { telemetry: "yes" | "no" }; };