Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/local-actions/branch-manager/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59159,7 +59159,13 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursor
//
var Prompt = class {
};
Prompt.confirm = esm_default4;
Prompt.confirm = (_config, _context) => {
const config = {
default: false,
..._config
};
return esm_default4(config, _context);
};
Prompt.input = esm_default5;
Prompt.checkbox = esm_default2;
Prompt.select = esm_default11;
Expand Down
8 changes: 7 additions & 1 deletion .github/local-actions/changelog/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -58722,7 +58722,13 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursor
//
var Prompt = class {
};
Prompt.confirm = esm_default4;
Prompt.confirm = (_config, _context) => {
const config2 = {
default: false,
..._config
};
return esm_default4(config2, _context);
};
Prompt.input = esm_default5;
Prompt.checkbox = esm_default2;
Prompt.select = esm_default11;
Expand Down
8 changes: 7 additions & 1 deletion github-actions/slash-commands/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59056,7 +59056,13 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes4.default.cursor
//
var Prompt = class {
};
Prompt.confirm = esm_default4;
Prompt.confirm = (_config, _context) => {
const config = {
default: false,
..._config
};
return esm_default4(config, _context);
};
Prompt.input = esm_default5;
Prompt.checkbox = esm_default2;
Prompt.select = esm_default11;
Expand Down
13 changes: 12 additions & 1 deletion ng-dev/utils/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ import {confirm, input, checkbox, select, editor} from '@inquirer/prompts';
* class to allow easier mocking management in test environments.
*/
export class Prompt {
static confirm: typeof confirm = confirm;
static confirm: typeof confirm = (
// These are extractions of the PromptConfig from the inquirer types.
_config: Parameters<typeof confirm>[0],
_context: Parameters<typeof confirm>[1],
) => {
/** Config to use when creating a confirm prompt, changes the default to `false` instead of `true`. */
const config = {
default: false,
..._config,
};
return confirm(config, _context);
};
static input: typeof input = input;
static checkbox: typeof checkbox = checkbox;
static select: typeof select = select;
Expand Down