"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handler = exports.help = exports.commandNames = exports.cliOptionsTypes = exports.rcOptionsTypes = void 0;
const config_1 = require("@pnpm/config");
const path = require("path");
const R = require("ramda");
const renderHelp = require("render-help");
exports.rcOptionsTypes = cliOptionsTypes;
function cliOptionsTypes() {
    return R.pick([
        'global',
    ], config_1.types);
}
exports.cliOptionsTypes = cliOptionsTypes;
exports.commandNames = ['root'];
function help() {
    return renderHelp({
        description: 'Print the effective \`node_modules\` directory.',
        descriptionLists: [
            {
                title: 'Options',
                list: [
                    {
                        description: 'Print the global \`node_modules\` directory',
                        name: '--global',
                        shortAlias: '-g',
                    },
                ],
            },
        ],
        usages: ['pnpm root [-g]'],
    });
}
exports.help = help;
async function handler(opts) {
    return `${path.join(opts.dir, 'node_modules')}\n`;
}
exports.handler = handler;
