<commit_before>const initTemplate = `
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
`;

export const questions = {
    overwriteChangelog: {
        type: 'confirm',
        message: 'A CHANGELOG.md exists, do you want to replace it?'
    },
    otraQuestion: {
        type: 'confirm',
        message: 'todo bien?'
    }
};

export default function () {
    return {
        command: 'init',
        describe: 'Creates a CHANGELOG.md if it does not exists. chan will work with this file.',
        handler(parser, argv, write) {
            const m = parser.createMDAST;
            if (parser.exists()) {
                return this.inquirer().prompt([
                    {
                        type: questions.overwriteChangelog.type,
                        name: 'overwriteChangelog',
                        message: questions.overwriteChangelog.message
                    },
                    {
                        type: questions.otraQuestion.type,
                        name: 'otraQuestion',
                        message: questions.otraQuestion.message
                    }
                ])
                .then( (answer) => {
                    if ( answer.overwriteChangelog && answer.otraQuestion ) {
                        parser.root.children = m(initTemplate);
                        write();
                    }
                });
            }
<commit_msg>fix init, remove question test<commit_after>const initTemplate = `
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
`;

export const questions = {
    overwriteChangelog: {
        type: 'confirm',
        message: 'A CHANGELOG.md exists, do you want to replace it?'
    }
};

export default function () {
    return {
        command: 'init',
        describe: 'Creates a CHANGELOG.md if it does not exists. chan will work with this file.',
        handler(parser, argv, write) {
            const m = parser.createMDAST;
            if (parser.exists()) {
                return this.inquirer().prompt([
                    {
                        type: questions.overwriteChangelog.type,
                        name: 'overwriteChangelog',
                        message: questions.overwriteChangelog.message
                    }
                ])
                .then( (answer) => {
                    if ( answer.overwriteChangelog ) {
                        parser.root.children = m(initTemplate);
                        write();
                    }
                });
            }

{'fraction_non_alphanumeric': 0.09495982468955443, 'fraction_numerical': 0.0, 'mean_word_length': 1.4026315789473685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6240890', 'n_tokens_mistral': 700, 'n_tokens_neox': 665, 'n_words': 183}