Primeiro commit do projeto Angular

This commit is contained in:
2026-03-14 20:41:55 +00:00
parent 9bebe1de72
commit 94f4f46395
22413 changed files with 3221690 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
import { ListrPromptAdapter, ListrTaskEventType, ListrTaskState } from "listr2";
//#region src/prompt.ts
var ListrInquirerPromptAdapter = class extends ListrPromptAdapter {
prompt;
signal = new AbortController();
/**
* Get the current running instance of `inquirer`.
*/
get instance() {
return this.prompt;
}
/**
* Create a new prompt with `inquirer`.
*/
async run(prompt, ...[config, context]) {
context ??= {};
context.output ??= this.wrapper.stdout(ListrTaskEventType.PROMPT);
context.signal ??= this.signal.signal;
this.reportStarted();
this.task.on(ListrTaskEventType.STATE, (event) => {
if (event === ListrTaskState.SKIPPED && this.prompt) this.cancel();
});
this.prompt = prompt(config, context);
let result;
try {
result = await this.prompt;
this.reportCompleted();
} catch (e) {
this.reportFailed();
throw e;
}
return result;
}
/**
* Cancel the ongoing prompt.
*/
cancel() {
if (!this.prompt) return;
this.reportFailed();
this.signal.abort("Prompt was cancelled");
}
};
//#endregion
export { ListrInquirerPromptAdapter };