Skip to content

Commit

Permalink
fix(deps): removed CancelablePromise type (removed from @inquirer/type)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreszorro committed Nov 19, 2024
1 parent 3407262 commit e1aefb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/utils/generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { CancelablePromise } from "@inquirer/type";
import chalk from "chalk";
import type {
AddAction,
Expand All @@ -12,7 +11,7 @@ import { ActionTypes, add, addMany, append } from "./actions";
* Added support for latest inquirer API
*/
export type QuestionsObject<T = string | boolean> = {
[key: string]: () => CancelablePromise<T>;
[key: string]: () => Promise<T>;
};

export type GeneratorDefinition<
Expand Down
7 changes: 2 additions & 5 deletions lib/utils/questions/system.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -79,10 +78,8 @@ export function resolveSystemQuestion(
options: { message: string } = {
message: "Relates to system:",
},
): CancelablePromise<string> {
const voidPromise: CancelablePromise<string> = new CancelablePromise(
(resolve) => resolve(""),
);
): Promise<string> {
const voidPromise: Promise<string> = new Promise((resolve) => resolve(""));
const workspaceInfo = typeof workspace !== "string" && workspace;

if (workspaceInfo) {
Expand Down

0 comments on commit e1aefb4

Please sign in to comment.