mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 20:35:24 +00:00
* wip on refactoring docs * wip * initial structured logs impl * structured log docs * create logger package * add news entry for structured logging * add logger package to dockerfile and cleanup * add gh workflow for catching broken links * further wip * fix * further wip on docs * review feedback * remove logger dep from mcp package * fix build errors * add back auth_url warning * fix sidebar title consistency --------- Co-authored-by: bkellam <bshizzle1234@gmail.com>
17 lines
467 B
TypeScript
17 lines
467 B
TypeScript
import readline from 'readline-sync';
|
|
import { createLogger } from "@sourcebot/logger";
|
|
|
|
const logger = createLogger('db-utils');
|
|
|
|
export const confirmAction = (message: string = "Are you sure you want to proceed? [N/y]") => {
|
|
const response = readline.question(message).toLowerCase();
|
|
if (response !== 'y') {
|
|
logger.info("Aborted.");
|
|
process.exit(0);
|
|
}
|
|
}
|
|
|
|
export const abort = () => {
|
|
logger.info("Aborted.");
|
|
process.exit(0);
|
|
};
|