From 6a70ac27cac33c6af58013e60111a22b0958a604 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 29 Nov 2024 11:03:53 +0100 Subject: [PATCH] Make clack utility for package overrides generic --- src/nuxt/sdk-setup.ts | 4 ++-- src/utils/clack-utils.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nuxt/sdk-setup.ts b/src/nuxt/sdk-setup.ts index 075d04b1..0545d2e1 100644 --- a/src/nuxt/sdk-setup.ts +++ b/src/nuxt/sdk-setup.ts @@ -17,7 +17,7 @@ import { import { abort, abortIfCancelled, - askShouldAddNuxtOverride, + askShouldAddPackageOverride, featureSelectionPrompt, isUsingTypeScript, } from '../utils/clack-utils'; @@ -236,7 +236,7 @@ export async function addNuxtOverrides( ); for (const { pkgName, pkgVersion } of overrides) { - const shouldAddOverride = await askShouldAddNuxtOverride( + const shouldAddOverride = await askShouldAddPackageOverride( pkgName, pkgVersion, ); diff --git a/src/utils/clack-utils.ts b/src/utils/clack-utils.ts index 21806b9b..94b5cf5b 100644 --- a/src/utils/clack-utils.ts +++ b/src/utils/clack-utils.ts @@ -1492,11 +1492,11 @@ export async function featureSelectionPrompt>( }); } -export async function askShouldAddNuxtOverride( +export async function askShouldAddPackageOverride( pkgName: string, pkgVersion: string, ): Promise { - return traceStep(`ask-add-nuxt-overrides`, () => + return traceStep(`ask-add-package-override`, () => abortIfCancelled( clack.confirm({ message: `Do you want to add an override for ${chalk.cyan(