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) {