From e1aefb4c1d293bbdde7800949c06f424b2412df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Zorro?= Date: Tue, 19 Nov 2024 12:36:32 -0500 Subject: [PATCH] fix(deps): removed CancelablePromise type (removed from @inquirer/type) --- lib/utils/generator.ts | 3 +-- lib/utils/questions/system.ts | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/utils/generator.ts b/lib/utils/generator.ts index b379912..b654f7f 100644 --- a/lib/utils/generator.ts +++ b/lib/utils/generator.ts @@ -1,4 +1,3 @@ -import type { CancelablePromise } from "@inquirer/type"; import chalk from "chalk"; import type { AddAction, @@ -12,7 +11,7 @@ import { ActionTypes, add, addMany, append } from "./actions"; * Added support for latest inquirer API */ export type QuestionsObject = { - [key: string]: () => CancelablePromise; + [key: string]: () => Promise; }; export type GeneratorDefinition< diff --git a/lib/utils/questions/system.ts b/lib/utils/questions/system.ts index 2481aa4..0341ccd 100644 --- a/lib/utils/questions/system.ts +++ b/lib/utils/questions/system.ts @@ -1,7 +1,6 @@ import { existsSync } from "node:fs"; import { resolve } from "node:path"; import { input, select } from "@inquirer/prompts"; -import { CancelablePromise } from "@inquirer/type"; import { kebabCase } from "change-case"; import { getWorkspacePath } from "../workspace"; import type { StructurizrWorkspace } from "../workspace"; @@ -79,10 +78,8 @@ export function resolveSystemQuestion( options: { message: string } = { message: "Relates to system:", }, -): CancelablePromise { - const voidPromise: CancelablePromise = new CancelablePromise( - (resolve) => resolve(""), - ); +): Promise { + const voidPromise: Promise = new Promise((resolve) => resolve("")); const workspaceInfo = typeof workspace !== "string" && workspace; if (workspaceInfo) {