__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

root@216.73.217.122: ~ $
#!/usr/bin/env node
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

import inquirer from 'inquirer';
import chalk from 'chalk';

import { createNote } from './note.mjs';
import { getInitialValues } from './helpers.mjs';
import * as Prompts from './prompts.mjs';
import logger from './logger.mjs';

export default async (options) => {
    // Processs the initial values.
    const initialValues = getInitialValues(options);

    // Fetch information.
    const messages = [];
    const { issueNumber } = await inquirer.prompt([
        Prompts.getIssuePrompt(),
    ], initialValues);

    let selection = {};
    let notePath;
    do {
        selection = {};
        selection = await inquirer.prompt([
            Prompts.getComponentsPrompt(),
            Prompts.getTypePrompt(),
            Prompts.getMessagePromptInput(),
        ], initialValues);
        if (selection.message === '') {
            selection = Object.assign(
                selection,
                await inquirer.prompt([
                    Prompts.getMessagePromptEditor(),
                ]),
            );
        }

            logger.info(`
    Creating upgrade note with the following options:

    - Issue:     ${chalk.bold(issueNumber)}
    - Component: ${chalk.bold(selection.components)}
    - Type:      ${chalk.bold(selection.type)}
    - Message:
    ${chalk.bold(selection.message)}
`);

        messages.push({
            components: [selection.components],
            type: selection.type,
            message: selection.message,
        });

        // Save the note so far.
        if (notePath) {
            await createNote(issueNumber, messages, notePath);
            logger.info(`Updated note at: ${chalk.underline(chalk.bold(notePath))}`);
        } else {
            notePath = await createNote(issueNumber, messages);
            logger.info(`Note created at: ${chalk.underline(chalk.bold(notePath))}`);
        }

        selection = Object.assign(
            selection,
            await inquirer.prompt([
                Prompts.getAddAnotherPrompt(),
            ], initialValues),
        );
    } while (selection.addAnother);
};

Filemanager

Name Type Size Permission Actions
components.mjs File 3.83 KB 0644
create.mjs File 2.72 KB 0644
generate.mjs File 11.02 KB 0644
helpers.mjs File 5.77 KB 0644
logger.mjs File 998 B 0644
note.mjs File 5.94 KB 0644
noteTypes.mjs File 1.86 KB 0644
prompts.mjs File 3.86 KB 0644
Filemanager