{"size": 915, "ext": "js", "max_stars_repo_path": "main/lib/question/askReleaseMessage.js", "max_stars_repo_name": "aehrc/node-generate-release", "max_stars_repo_stars_event_min_datetime": "2016-01-25T18:03:17.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-04T04:59:43.000Z", "max_issues_repo_path": "main/lib/question/askReleaseMessage.js", "max_issues_repo_name": "aehrc/node-generate-release", "max_issues_repo_issues_event_min_datetime": "2016-06-29T19:21:11.000Z", "max_issues_repo_issues_event_max_datetime": "2018-01-18T06:09:41.000Z", "max_forks_repo_path": "main/lib/question/askReleaseMessage.js", "max_forks_repo_name": "aehrc/node-generate-release", "max_forks_repo_forks_event_min_datetime": "2016-06-30T14:23:57.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-20T01:43:57.000Z"}
{"max_stars_count": 38, "max_issues_count": 31, "max_forks_count": 11, "avg_line_length": 41.5909090909, "max_line_length": 123, "alphanum_fraction": 0.650273224}
"use strict";
/**
 * Generate Release
 * Written by Kevin Gravier <kevin@mrkmg.com>
 * MIT License 2018
 */
Object.defineProperty(exports, "__esModule", { value: true });
var inquirer_1 = require("inquirer");
var INFO_MESSAGE = "\n# Please write your release message above\n#\n# Any line which starts with \"#\" will be ignored.\n";
function askReleaseMessage(newVersion) {
    var args = {
        default: "Release " + newVersion + "\n\n\n" + INFO_MESSAGE,
        filter: function (result) { return result.replace(/^#.*$/gm, "").replace(/\n+$/g, ""); },
        message: "Please write a release message.",
        name: "message",
        type: "editor",
        validate: function (result) { return result.length === 0 ? "Release message can not be empty." : true; },
    };
    return inquirer_1.prompt(args).then(function (result) { return result.message; });
}
exports.askReleaseMessage = askReleaseMessage;
