code:
import { command as Command, } from './command.js';
import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js';
import { YError } from './yerror.js';
import { usage as Usage } from './usage.js';
import { argsert } from './argsert.js';
import { completion as Completion, } from './completion.js';
import { validation as Validation, } from './validation.js';
import { objFilter } from './utils/obj-filter.js';
import { applyExtends } from './utils/apply-extends.js';
import { globalMiddlewareFactory, } from './middleware.js';
import { isPromise } from './utils/is-promise.js';
import setBlocking from './utils/set-blocking.js';
let shim;
export function YargsWithShim(_shim) {
    shim = _shim;
    return Yargs;
}
function Yargs(processArgs = [], cwd = shim.process.cwd(), parentRequire) {
    const self = {};
    let command;
    let completion = null;
    let groups = {};
    const globalMiddleware = [];
    let output = '';
    const preservedGroups = {};
    let usage;
    let validation;
    let handlerFinishCommand = null;
    const y18n = shim.y18n;
    self.middleware = globalMiddlewareFactory(globalMiddleware, self);
    self.scriptName = function (scriptName) {
        self.customScriptName = true;
        self.$0 = scriptName;
        return self;
    };
    let default$0;
    if (/\b(node|iojs|electron)(\.exe)?$/.test(shim.process.argv()[0])) {
        default$0 = shim.process.argv().slice(1, 2);
    }
    else {
        default$0 = shim.process.argv().slice(0, 1);
    }
    self.$0 = default$0
        .map(x => {
        const b = rebase(cwd, x);
        return x.match(/^(\/|([a-zA-Z]:)?\\)/) && b.length < x.length ? b : x;
    })
        .join(' ')
        .trim();
    if (shim.getEnv('_') && shim.getProcessArgvBin() === shim.getEnv('_')) {
        self.$0 = shim
            .getEnv('_')
            .replace(`${shim.path.dirname(shim.process.execPath())}/`, '');
    }
    const context = { resets: -1, commands: [], fullCommands: [], files: [] };
    self.getContext = () => context;
    let hasOutput = false;
    let exitError = null;
    self.exit = (code, err) => {
        hasOutput = true;
        exitError = err;
        if (exitProcess)
            shim.process.exit(code);
    };
    let completionCommand = null;
    self.completion = function (cmd, desc, fn) {
        argsert('[string] [string|boolean|function] [function]', [cmd, desc, fn], arguments.length);
        if (typeof desc === 'function') {
            fn = desc;
            desc = undefined;
        }
        completionCommand = cmd || completionCommand || 'completion';
        if (!desc && desc !== false) {
            desc = 'generate completion script';
        }
        self.command(completionCommand, desc);
        if (fn)
            completion.registerFunction(fn);
        return self;
    };
    let options;
    self.resetOptions = self.reset = function resetOptions(aliases = {}) {
        context.resets++;
        options = options || {};
        const tmpOptions = {};
        tmpOptions.local = options.local ? options.local : [];
        tmpOptions.configObjects = options.configObjects
            ? options.configObjects
            : [];
        const localLookup = {};
        tmpOptions.local.forEach(l => {
            localLookup[l] = true;
            (aliases[l] || []).forEach(a => {
                localLookup[a] = true;
            });
        });
        Object.assign(preservedGroups, Object.keys(groups).reduce((acc, groupName) => {
            const keys = groups[groupName].filter(key => !(key in localLookup));
            if (keys.length > 0) {
                acc[groupName] = keys;
            }
            return acc;
        }, {}));
        groups = {};
        const arrayOptions = [
            'array',
            'boolean',
            'string',
            'skipValidation',
            'count',
            'normalize',
            'number',
            'hiddenOptions',
        ];
        const objectOptions = [
            'narg',
            'key',
            'alias',
            'default',
            'defaultDescription',
            'config',
            'choices',
            'demandedOptions',
            'demandedCommands',
            'coerce',
            'deprecatedOptions',
        ];
        arrayOptions.forEach(k => {
            tmpOptions[k] = (options[k] || []).filter((k) => !localLookup[k]);
        });
        objectOptions.forEach((k) => {
            tmpOptions[k] = objFilter(options[k], k => !localLookup[k]);
        });
        tmpOptions.envPrefix = options.envPrefix;
        options = tmpOptions;
        usage = usage ? usage.reset(localLookup) : Usage(self, y18n, shim);
        validation = validation
            ? validation.reset(localLookup)
            : Validation(self, usage, y18n, shim);
        command = command
            ? command.reset()
            : Command(self, usage, validation, globalMiddleware, shim);
        if (!completion)
            completion = Completion(self, usage, command, shim);
        completionCommand = null;
        output = '';
        exitError = null;
        hasOutput = false;
        self.parsed = false;
        return self;
    };
    self.resetOptions();
    const frozens = [];
    function freeze() {
        frozens.push({
            options,
            configObjects: options.configObjects.slice(0),
            exitProcess,
            groups,
            strict,
            strictCommands,
            strictOptions,
            completionCommand,
            output,
            exitError,
            hasOutput,
            parsed: self.parsed,
            parseFn,
            parseContext,
            handlerFinishCommand,
        });
        usage.freeze();
        validation.freeze();
        command.freeze();
    }
    function unfreeze() {
        const frozen = frozens.pop();
        assertNotStrictEqual(frozen, undefined, shim);
        let configObjects;
        ({
            options,
            configObjects,
            exitProcess,
            groups,
            output,
            exitError,
            hasOutput,
            parsed: self.parsed,
            strict,
            strictCommands,
            strictOptions,
            completionCommand,
            parseFn,
            parseContext,
            handlerFinishCommand,
        } = frozen);
        options.configObjects = configObjects;
        usage.unfreeze();
        validation.unfreeze();
        command.unfreeze();
    }
    self.boolean = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('boolean', keys);
        return self;
    };
    self.array = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('array', keys);
        return self;
    };
    self.number = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('number', keys);
        return self;
    };
    self.normalize = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('normalize', keys);
        return self;
    };
    self.count = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('count', keys);
        return self;
    };
    self.string = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('string', keys);
        return self;
    };
    self.requiresArg = function (keys) {
        argsert('<array|string|object> [number]', [keys], arguments.length);
        if (typeof keys === 'string' && options.narg[keys]) {
            return self;
        }
        else {
            populateParserHintSingleValueDictionary(self.requiresArg, 'narg', keys, NaN);
        }
        return self;
    };
    self.skipValidation = function (keys) {
        argsert('<array|string>', [keys], arguments.length);
        populateParserHintArray('skipValidation', keys);
        return self;
    };
    function populateParserHintArray(type, keys) {
        keys = [].concat(keys);
        keys.forEach(key => {
            key = sanitizeKey(key);
            options[type].push(key);
        });
    }
    self.nargs = function (key, value) {
        argsert('<string|object|array> [number]', [key, value], arguments.length);
        populateParserHintSingleValueDictionary(self.nargs, 'narg', key, value);
        return self;
    };
    self.choices = function (key, value) {
        argsert('<object|string|array> [string|array]', [key, value], arguments.length);
        populateParserHintArrayDictionary(self.choices, 'choices', key, value);
        return self;
    };
    self.alias = function (key, value) {
        argsert('<object|string|array> [string|array]', [key, value], arguments.length);
        populateParserHintArrayDictionary(self.alias, 'alias', key, value);
        return self;
    };
    self.default = self.defaults = function (key, value, defaultDescription) {
        argsert('<object|string|array> [*] [string]', [key, value, defaultDescription], arguments.length);
        if (defaultDescription) {
            assertSingleKey(key, shim);
            options.defaultDescription[key] = defaultDescription;
        }
        if (typeof value === 'function') {
            assertSingleKey(key, shim);
            if (!options.defaultDescription[key])
                options.defaultDescription[key] = usage.functionDescription(value);
            value = value.call();
        }
        populateParserHintSingleValueDictionary(self.default, 'default', key, value);
        return self;
    };
    self.describe = function (key, desc) {
        argsert('<object|string|array> [string]', [key, desc], arguments.length);
        setKey(key, true);
        usage.describe(key, desc);
        return self;
    };
    function setKey(key, set) {
        populateParserHintSingleValueDictionary(setKey, 'key', key, set);
        return self;
    }
    function demandOption(keys, msg) {
        argsert('<object|string|array> [string]', [keys, msg], arguments.length);
        populateParserHintSingleValueDictionary(self.demandOption, 'demandedOptions', keys, msg);
        return self;
    }
    self.demandOption = demandOption;
    self.coerce = function (keys, value) {
        argsert('<object|string|array> [function]', [keys, value], arguments.length);
        populateParserHintSingleValueDictionary(self.coerce, 'coerce', keys, value);
        return self;
    };
    function populateParserHintSingleValueDictionary(builder, type, key, value) {
        populateParserHintDictionary(builder, type, key, value, (type, key, value) => {
            options[type][key] = value;
        });
    }
    function populateParserHintArrayDictionary(builder, type, key, value) {
        populateParserHintDictionary(builder, type, key, value, (type, key, value) => {
            options[type][key] = (options[type][key] || []).concat(value);
        });
    }
    function populateParserHintDictionary(builder, type, key, value, singleKeyHandler) {
        if (Array.isArray(key)) {
            key.forEach(k => {
                builder(k, value);
            });
        }
        else if (((key) => typeof key === 'object')(key)) {
            for (const k of objectKeys(key)) {
                builder(k, key[k]);
            }
        }
        else {
            singleKeyHandler(type, sanitizeKey(key), value);
        }
    }
    function sanitizeKey(key) {
        if (key === '__proto__')
            return '___proto___';
        return key;
    }
    function deleteFromParserHintObject(optionKey) {
        objectKeys(options).forEach((hintKey) => {
            if (((key) => key === 'configObjects')(hintKey))
                return;
            const hint = options[hintKey];
            if (Array.isArray(hint)) {
                if (~hint.indexOf(optionKey))
                    hint.splice(hint.indexOf(optionKey), 1);
            }
            else if (typeof hint === 'object') {
                delete hint[optionKey];
            }
        });
        delete usage.getDescriptions()[optionKey];
    }
    self.config = function config(key = 'config', msg, parseFn) {
        argsert('[object|string] [string|function] [function]', [key, msg, parseFn], arguments.length);
        if (typeof key === 'object' && !Array.isArray(key)) {
            key = applyExtends(key, cwd, self.getParserConfiguration()['deep-merge-config'] || false, shim);
            options.configObjects = (options.configObjects || []).concat(key);
            return self;
        }
        if (typeof msg === 'function') {
            parseFn = msg;
            msg = undefined;
        }
        self.describe(key, msg || usage.deferY18nLookup('Path to JSON config file'));
        (Array.isArray(key) ? key : [key]).forEach(k => {
            options.config[k] = parseFn || true;
        });
        return self;
    };
    self.example = function (cmd, description) {
        argsert('<string|array> [string]', [cmd, description], arguments.length);
        if (Array.isArray(cmd)) {
            cmd.forEach(exampleParams => self.example(...exampleParams));
        }
        else {
            usage.example(cmd, description);
        }
        return self;
    };
    self.command = function (cmd, description, builder, handler, middlewares, deprecated) {
        argsert('<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]', [cmd, description, builder, handler, middlewares, deprecated], arguments.length);
        command.addHandler(cmd, description, builder, handler, middlewares, deprecated);
        return self;
    };
    self.commandDir = function (dir, opts) {
        argsert('<string> [object]', [dir, opts], arguments.length);
        const req = parentRequire || shim.require;
        command.addDirectory(dir, self.getContext(), req, shim.getCallerFile(), opts);
        return self;
    };
    self.demand = self.required = self.require = function demand(keys, max, msg) {
        if (Array.isArray(max)) {
            max.forEach(key => {
                assertNotStrictEqual(msg, true, shim);
                demandOption(key, msg);
            });
            max = Infinity;
        }
        else if (typeof max !== 'number') {
            msg = max;
            max = Infinity;
        }
        if (typeof keys === 'number') {
            assertNotStrictEqual(msg, true, shim);
            self.demandCommand(keys, max, msg, msg);
        }
        else if (Array.isArray(keys)) {
            keys.forEach(key => {
                assertNotStrictEqual(msg, true, shim);
                demandOption(key, msg);
            });
        }
        else {
            if (typeof msg === 'string') {
                demandOption(keys, msg);
            }
            else if (msg === true || typeof msg === 'undefined') {
                demandOption(keys);
            }
        }
        return self;
    };
    self.demandCommand = function demandCommand(min = 1, max, minMsg, maxMsg) {
        argsert('[number] [number|string] [string|null|undefined] [string|null|undefined]', [min, max, minMsg, maxMsg], arguments.length);
        if (typeof max !== 'number') {
            minMsg = max;
            max = Infinity;
        }
        self.global('_', false);
        options.demandedCommands._ = {
            min,
            max,
            minMsg,
            maxMsg,
        };
        return self;
    };
    self.getDemandedOptions = () => {
        argsert([], 0);
        return options.demandedOptions;
    };
    self.getDemandedCommands = () => {
        argsert([], 0);
        return options.demandedCommands;
    };
    self.deprecateOption = function deprecateOption(option, message) {
        argsert('<string> [string|boolean]', [option, message], arguments.length);
        options.deprecatedOptions[option] = message;
        return self;
    };
    self.getDeprecatedOptions = () => {
        argsert([], 0);
        return options.deprecatedOptions;
    };
    self.implies = function (key, value) {
        argsert('<string|object> [number|string|array]', [key, value], arguments.length);
        validation.implies(key, value);
        return self;
    };
    self.conflicts = function (key1, key2) {
        argsert('<string|object> [string|array]', [key1, key2], arguments.length);
        validation.conflicts(key1, key2);
        return self;
    };
    self.usage = function (msg, description, builder, handler) {
        argsert('<string|null|undefined> [string|boolean] [function|object] [function]', [msg, description, builder, handler], arguments.length);
        if (description !== undefined) {
            assertNotStrictEqual(msg, null, shim);
            if ((msg || '').match(/^\$0( |$)/)) {
                return self.command(msg, description, builder, handler);
            }
            else {
                throw new YError('.usage() description must start with $0 if being used as alias for .command()');
            }
        }
        else {
            usage.usage(msg);
            return self;
        }
    };
    self.epilogue = self.epilog = function (msg) {
        argsert('<string>', [msg], arguments.length);
        usage.epilog(msg);
        return self;
    };
    self.fail = function (f) {
        argsert('<function>', [f], arguments.length);
        usage.failFn(f);
        return self;
    };
    self.onFinishCommand = function (f) {
        argsert('<function>', [f], arguments.length);
        handlerFinishCommand = f;
        return self;
    };
    self.getHandlerFinishCommand = () => handlerFinishCommand;
    self.check = function (f, _global) {
        argsert('<function> [boolean]', [f, _global], arguments.length);
        validation.check(f, _global !== false);
        return self;
    };
    self.global = function global(globals, global) {
        argsert('<string|array> [boolean]', [globals, global], arguments.length);
        globals = [].concat(globals);
        if (global !== false) {
            options.local = options.local.filter(l => globals.indexOf(l) === -1);
        }
        else {
            globals.forEach(g => {
                if (options.local.indexOf(g) === -1)
                    options.local.push(g);
            });
        }
        return self;
    };
    self.pkgConf = function pkgConf(key, rootPath) {
        argsert('<string> [string]', [key, rootPath], arguments.length);
        let conf = null;
        const obj = pkgUp(rootPath || cwd);
        if (obj[key] && typeof obj[key] === 'object') {
            conf = applyExtends(obj[key], rootPath || cwd, self.getParserConfiguration()['deep-merge-config'] || false, shim);
            options.configObjects = (options.configObjects || []).concat(conf);
        }
        return self;
    };
    const pkgs = {};
    function pkgUp(rootPath) {
        const npath = rootPath || '*';
        if (pkgs[npath])
            return pkgs[npath];
        let obj = {};
        try {
            let startDir = rootPath || shim.mainFilename;
            if (!rootPath && shim.path.extname(startDir)) {
                startDir = shim.path.dirname(startDir);
            }
            const pkgJsonPath = shim.findUp(startDir, (dir, names) => {
                if (names.includes('package.json')) {
                    return 'package.json';
                }
                else {
                    return undefined;
                }
            });
            assertNotStrictEqual(pkgJsonPath, undefined, shim);
            obj = JSON.parse(shim.readFileSync(pkgJsonPath, 'utf8'));
        }
        catch (_noop) { }
        pkgs[npath] = obj || {};
        return pkgs[npath];
    }
    let parseFn = null;
    let parseContext = null;
    self.parse = function parse(args, shortCircuit, _parseFn) {
        argsert('[string|array] [function|boolean|object] [function]', [args, shortCircuit, _parseFn], arguments.length);
        freeze();
        if (typeof args === 'undefined') {
            const argv = self._parseArgs(processArgs);
            const tmpParsed = self.parsed;
            unfreeze();
            self.parsed = tmpParsed;
            return argv;
        }
        if (typeof shortCircuit === 'object') {
            parseContext = shortCircuit;
            shortCircuit = _parseFn;
        }
        if (typeof shortCircuit === 'function') {
            parseFn = shortCircuit;
            shortCircuit = false;
        }
        if (!shortCircuit)
            processArgs = args;
        if (parseFn)
            exitProcess = false;
        const parsed = self._parseArgs(args, !!shortCircuit);
        completion.setParsed(self.parsed);
        if (parseFn)
            parseFn(exitError, parsed, output);
        unfreeze();
        return parsed;
    };
    self._getParseContext = () => parseContext || {};
    self._hasParseCallback = () => !!parseFn;
    self.option = self.options = function option(key, opt) {
        argsert('<string|object> [object]', [key, opt], arguments.length);
        if (typeof key === 'object') {
            Object.keys(key).forEach(k => {
                self.options(k, key[k]);
            });
        }
        else {
            if (typeof opt !== 'object') {
                opt = {};
            }
            options.key[key] = true;
            if (opt.alias)
                self.alias(key, opt.alias);
            const deprecate = opt.deprecate || opt.deprecated;
            if (deprecate) {
                self.deprecateOption(key, deprecate);
            }
            const demand = opt.demand || opt.required || opt.require;
            if (demand) {
                self.demand(key, demand);
            }
            if (opt.demandOption) {
                self.demandOption(key, typeof opt.demandOption === 'string' ? opt.demandOption : undefined);
            }
            if (opt.conflicts) {
                self.conflicts(key, opt.conflicts);
            }
            if ('default' in opt) {
                self.default(key, opt.default);
            }
            if (opt.implies !== undefined) {
                self.implies(key, opt.implies);
            }
            if (opt.nargs !== undefined) {
                self.nargs(key, opt.nargs);
            }
            if (opt.config) {
                self.config(key, opt.configParser);
            }
            if (opt.normalize) {
                self.normalize(key);
            }
            if (opt.choices) {
                self.choices(key, opt.choices);
            }
            if (opt.coerce) {
                self.coerce(key, opt.coerce);
            }
            if (opt.group) {
                self.group(key, opt.group);
            }
            if (opt.boolean || opt.type === 'boolean') {
                self.boolean(key);
                if (opt.alias)
                    self.boolean(opt.alias);
            }
            if (opt.array || opt.type === 'array') {
                self.array(key);
                if (opt.alias)
                    self.array(opt.alias);
            }
            if (opt.number || opt.type === 'number') {
                self.number(key);
                if (opt.alias)
                    self.number(opt.alias);
            }
            if (opt.string || opt.type === 'string') {
                self.string(key);
                if (opt.alias)
                    self.string(opt.alias);
            }
            if (opt.count || opt.type === 'count') {
                self.count(key);
            }
            if (typeof opt.global === 'boolean') {
                self.global(key, opt.global);
            }
            if (opt.defaultDescription) {
                options.defaultDescription[key] = opt.defaultDescription;
            }
            if (opt.skipValidation) {
                self.skipValidation(key);
            }
            const desc = opt.describe || opt.description || opt.desc;
            self.describe(key, desc);
            if (opt.hidden) {
                self.hide(key);
            }
            if (opt.requiresArg) {
                self.requiresArg(key);
            }
        }
        return self;
    };
    self.getOptions = () => options;
    self.positional = function (key, opts) {
        argsert('<string> <object>', [key, opts], arguments.length);
        if (context.resets === 0) {
            throw new YError(".positional() can only be called in a command's builder function");
        }
        const supportedOpts = [
            'default',
            'defaultDescription',
            'implies',
            'normalize',
            'choices',
            'conflicts',
            'coerce',
            'type',
            'describe',
            'desc',
            'description',
            'alias',
        ];
        opts = objFilter(opts, (k, v) => {
            let accept = supportedOpts.indexOf(k) !== -1;
            if (k === 'type' && ['string', 'number', 'boolean'].indexOf(v) === -1)
                accept = false;
            return accept;
        });
        const fullCommand = context.fullCommands[context.fullCommands.length - 1];
        const parseOptions = fullCommand
            ? command.cmdToParseOptions(fullCommand)
            : {
                array: [],
                alias: {},
                default: {},
                demand: {},
            };
        objectKeys(parseOptions).forEach(pk => {
            const parseOption = parseOptions[pk];
            if (Array.isArray(parseOption)) {
                if (parseOption.indexOf(key) !== -1)
                    opts[pk] = true;
            }
            else {
                if (parseOption[key] && !(pk in opts))
                    opts[pk] = parseOption[key];
            }
        });
        self.group(key, usage.getPositionalGroupName());
        return self.option(key, opts);
    };
    self.group = function group(opts, groupName) {
        argsert('<string|array> <string>', [opts, groupName], arguments.length);
        const existing = preservedGroups[groupName] || groups[groupName];
        if (preservedGroups[groupName]) {
            delete preservedGroups[groupName];
        }
        const seen = {};
        groups[groupName] = (existing || []).concat(opts).filter(key => {
            if (seen[key])
                return false;
            return (seen[key] = true);
        });
        return self;
    };
    self.getGroups = () => Object.assign({}, groups, preservedGroups);
    self.env = function (prefix) {
        argsert('[string|boolean]', [prefix], arguments.length);
        if (prefix === false)
            delete options.envPrefix;
        else
            options.envPrefix = prefix || '';
        return self;
    };
    self.wrap = function (cols) {
        argsert('<number|null|undefined>', [cols], arguments.length);
        usage.wrap(cols);
        return self;
    };
    let strict = false;
    self.strict = function (enabled) {
        argsert('[boolean]', [enabled], arguments.length);
        strict = enabled !== false;
        return self;
    };
    self.getStrict = () => strict;
    let strictCommands = false;
    self.strictCommands = function (enabled) {
        argsert('[boolean]', [enabled], arguments.length);
        strictCommands = enabled !== false;
        return self;
    };
    self.getStrictCommands = () => strictCommands;
    let strictOptions = false;
    self.strictOptions = function (enabled) {
        argsert('[boolean]', [enabled], arguments.length);
        strictOptions = enabled !== false;
        return self;
    };
    self.getStrictOptions = () => strictOptions;
    let parserConfig = {};
    self.parserConfiguration = function parserConfiguration(config) {
        argsert('<object>', [config], arguments.length);
        parserConfig = config;
        return self;
    };
    self.getParserConfiguration = () => parserConfig;
    self.showHelp = function (level) {
        argsert('[string|function]', [level], arguments.length);
        if (!self.parsed)
            self._parseArgs(processArgs);
        if (command.hasDefaultCommand()) {
            context.resets++;
            command.runDefaultBuilderOn(self);
        }
        usage.showHelp(level);
        return self;
    };
    let versionOpt = null;
    self.version = function version(opt, msg, ver) {
        const defaultVersionOpt = 'version';
        argsert('[boolean|string] [string] [string]', [opt, msg, ver], arguments.length);
        if (versionOpt) {
            deleteFromParserHintObject(versionOpt);
            usage.version(undefined);
            versionOpt = null;
        }
        if (arguments.length === 0) {
            ver = guessVersion();
            opt = defaultVersionOpt;
        }
        else if (arguments.length === 1) {
            if (opt === false) {
                return self;
            }
            ver = opt;
            opt = defaultVersionOpt;
        }
        else if (arguments.length === 2) {
            ver = msg;
            msg = undefined;
        }
        versionOpt = typeof opt === 'string' ? opt : defaultVersionOpt;
        msg = msg || usage.deferY18nLookup('Show version number');
        usage.version(ver || undefined);
        self.boolean(versionOpt);
        self.describe(versionOpt, msg);
        return self;
    };
    function guessVersion() {
        const obj = pkgUp();
        return obj.version || 'unknown';
    }
    let helpOpt = null;
    self.addHelpOpt = self.help = function addHelpOpt(opt, msg) {
        const defaultHelpOpt = 'help';
        argsert('[string|boolean] [string]', [opt, msg], arguments.length);
        if (helpOpt) {
            deleteFromParserHintObject(helpOpt);
            helpOpt = null;
        }
        if (arguments.length === 1) {
            if (opt === false)
                return self;
        }
        helpOpt = typeof opt === 'string' ? opt : defaultHelpOpt;
        self.boolean(helpOpt);
        self.describe(helpOpt, msg || usage.deferY18nLookup('Show help'));
        return self;
    };
    const defaultShowHiddenOpt = 'show-hidden';
    options.showHiddenOpt = defaultShowHiddenOpt;
    self.addShowHiddenOpt = self.showHidden = function addShowHiddenOpt(opt, msg) {
        argsert('[string|boolean] [string]', [opt, msg], arguments.length);
        if (arguments.length === 1) {
            if (opt === false)
                return self;
        }
        const showHiddenOpt = typeof opt === 'string' ? opt : defaultShowHiddenOpt;
        self.boolean(showHiddenOpt);
        self.describe(showHiddenOpt, msg || usage.deferY18nLookup('Show hidden options'));
        options.showHiddenOpt = showHiddenOpt;
        return self;
    };
    self.hide = function hide(key) {
        argsert('<string>', [key], arguments.length);
        options.hiddenOptions.push(key);
        return self;
    };
    self.showHelpOnFail = function showHelpOnFail(enabled, message) {
        argsert('[boolean|string] [string]', [enabled, message], arguments.length);
        usage.showHelpOnFail(enabled, message);
        return self;
    };
    let exitProcess = true;
    self.exitProcess = function (enabled = true) {
        argsert('[boolean]', [enabled], arguments.length);
        exitProcess = enabled;
        return self;
    };
    self.getExitProcess = () => exitProcess;
    self.showCompletionScript = function ($0, cmd) {
        argsert('[string] [string]', [$0, cmd], arguments.length);
        $0 = $0 || self.$0;
        _logger.log(completion.generateCompletionScript($0, cmd || completionCommand || 'completion'));
        return self;
    };
    self.getCompletion = function (args, done) {
        argsert('<array> <function>', [args, done], arguments.length);
        completion.getCompletion(args, done);
    };
    self.locale = function (locale) {
        argsert('[string]', [locale], arguments.length);
        if (!locale) {
            guessLocale();
            return y18n.getLocale();
        }
        detectLocale = false;
        y18n.setLocale(locale);
        return self;
    };
    self.updateStrings = self.updateLocale = function (obj) {
        argsert('<object>', [obj], arguments.length);
        detectLocale = false;
        y18n.updateLocale(obj);
        return self;
    };
    let detectLocale = true;
    self.detectLocale = function (detect) {
        argsert('<boolean>', [detect], arguments.length);
        detectLocale = detect;
        return self;
    };
    self.getDetectLocale = () => detectLocale;
    const _logger = {
        log(...args) {
            if (!self._hasParseCallback())
                console.log(...args);
            hasOutput = true;
            if (output.length)
                output += '\n';
            output += args.join(' ');
        },
        error(...args) {
            if (!self._hasParseCallback())
                console.error(...args);
            hasOutput = true;
            if (output.length)
                output += '\n';
            output += args.join(' ');
        },
    };
    self._getLoggerInstance = () => _logger;
    self._hasOutput = () => hasOutput;
    self._setHasOutput = () => {
        hasOutput = true;
    };
    let recommendCommands;
    self.recommendCommands = function (recommend = true) {
        argsert('[boolean]', [recommend], arguments.length);
        recommendCommands = recommend;
        return self;
    };
    self.getUsageInstance = () => usage;
    self.getValidationInstance = () => validation;
    self.getCommandInstance = () => command;
    self.terminalWidth = () => {
        argsert([], 0);
        return shim.process.stdColumns;
    };
    Object.defineProperty(self, 'argv', {
        get: () => self._parseArgs(processArgs),
        enumerable: true,
    });
    self._parseArgs = function parseArgs(args, shortCircuit, _calledFromCommand, commandIndex) {
        let skipValidation = !!_calledFromCommand;
        args = args || processArgs;
        options.__ = y18n.__;
        options.configuration = self.getParserConfiguration();
        const populateDoubleDash = !!options.configuration['populate--'];
        const config = Object.assign({}, options.configuration, {
            'populate--': true,
        });
        const parsed = shim.Parser.detailed(args, Object.assign({}, options, {
            configuration: Object.assign({ 'parse-positional-numbers': false }, config),
        }));
        let argv = parsed.argv;
        if (parseContext)
            argv = Object.assign({}, argv, parseContext);
        const aliases = parsed.aliases;
        argv.$0 = self.$0;
        self.parsed = parsed;
        try {
            guessLocale();
            if (shortCircuit) {
                return self._postProcess(argv, populateDoubleDash, _calledFromCommand);
            }
            if (helpOpt) {
                const helpCmds = [helpOpt]
                    .concat(aliases[helpOpt] || [])
                    .filter(k => k.length > 1);
                if (~helpCmds.indexOf('' + argv._[argv._.length - 1])) {
                    argv._.pop();
                    argv[helpOpt] = true;
                }
            }
            const handlerKeys = command.getCommands();
            const requestCompletions = completion.completionKey in argv;
            const skipRecommendation = argv[helpOpt] || requestCompletions;
            const skipDefaultCommand = skipRecommendation &&
                (handlerKeys.length > 1 || handlerKeys[0] !== '$0');
            if (argv._.length) {
                if (handlerKeys.length) {
                    let firstUnknownCommand;
                    for (let i = commandIndex || 0, cmd; argv._[i] !== undefined; i++) {
                        cmd = String(argv._[i]);
                        if (~handlerKeys.indexOf(cmd) && cmd !== completionCommand) {
                            const innerArgv = command.runCommand(cmd, self, parsed, i + 1);
                            return self._postProcess(innerArgv, populateDoubleDash);
                        }
                        else if (!firstUnknownCommand && cmd !== completionCommand) {
                            firstUnknownCommand = cmd;
                            break;
                        }
                    }
                    if (command.hasDefaultCommand() && !skipDefaultCommand) {
                        const innerArgv = command.runCommand(null, self, parsed);
                        return self._postProcess(innerArgv, populateDoubleDash);
                    }
                    if (recommendCommands && firstUnknownCommand && !skipRecommendation) {
                        validation.recommendCommands(firstUnknownCommand, handlerKeys);
                    }
                }
                if (completionCommand &&
                    ~argv._.indexOf(completionCommand) &&
                    !requestCompletions) {
                    if (exitProcess)
                        setBlocking(true);
                    self.showCompletionScript();
                    self.exit(0);
                }
            }
            else if (command.hasDefaultCommand() && !skipDefaultCommand) {
                const innerArgv = command.runCommand(null, self, parsed);
                return self._postProcess(innerArgv, populateDoubleDash);
            }
            if (requestCompletions) {
                if (exitProcess)
                    setBlocking(true);
                args = [].concat(args);
                const completionArgs = args.slice(args.indexOf(`--${completion.completionKey}`) + 1);
                completion.getCompletion(completionArgs, completions => {
                    (completions || []).forEach(completion => {
                        _logger.log(completion);
                    });
                    self.exit(0);
                });
                return self._postProcess(argv, !populateDoubleDash, _calledFromCommand);
            }
            if (!hasOutput) {
                Object.keys(argv).forEach(key => {
                    if (key === helpOpt && argv[key]) {
                        if (exitProcess)
                            setBlocking(true);
                        skipValidation = true;
                        self.showHelp('log');
                        self.exit(0);
                    }
                    else if (key === versionOpt && argv[key]) {
                        if (exitProcess)
                            setBlocking(true);
                        skipValidation = true;
                        usage.showVersion();
                        self.exit(0);
                    }
                });
            }
            if (!skipValidation && options.skipValidation.length > 0) {
                skipValidation = Object.keys(argv).some(key => options.skipValidation.indexOf(key) >= 0 && argv[key] === true);
            }
            if (!skipValidation) {
                if (parsed.error)
                    throw new YError(parsed.error.message);
                if (!requestCompletions) {
                    self._runValidation(argv, aliases, {}, parsed.error);
                }
            }
        }
        catch (err) {
            if (err instanceof YError)
                usage.fail(err.message, err);
            else
                throw err;
        }
        return self._postProcess(argv, populateDoubleDash, _calledFromCommand);
    };
    self._postProcess = function (argv, populateDoubleDash, calledFromCommand = false) {
        if (isPromise(argv))
            return argv;
        if (calledFromCommand)
            return argv;
        if (!populateDoubleDash) {
            argv = self._copyDoubleDash(argv);
        }
        const parsePositionalNumbers = self.getParserConfiguration()['parse-positional-numbers'] ||
            self.getParserConfiguration()['parse-positional-numbers'] === undefined;
        if (parsePositionalNumbers) {
            argv = self._parsePositionalNumbers(argv);
        }
        return argv;
    };
    self._copyDoubleDash = function (argv) {
        if (!argv._ || !argv['--'])
            return argv;
        argv._.push.apply(argv._, argv['--']);
        try {
            delete argv['--'];
        }
        catch (_err) { }
        return argv;
    };
    self._parsePositionalNumbers = function (argv) {
        const args = argv['--'] ? argv['--'] : argv._;
        for (let i = 0, arg; (arg = args[i]) !== undefined; i++) {
            if (shim.Parser.looksLikeNumber(arg) &&
                Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) {
                args[i] = Number(arg);
            }
        }
        return argv;
    };
    self._runValidation = function runValidation(argv, aliases, positionalMap, parseErrors, isDefaultCommand = false) {
        if (parseErrors)
            throw new YError(parseErrors.message);
        validation.nonOptionCount(argv);
        validation.requiredArguments(argv);
        let failedStrictCommands = false;
        if (strictCommands) {
            failedStrictCommands = validation.unknownCommands(argv);
        }
        if (strict && !failedStrictCommands) {
            validation.unknownArguments(argv, aliases, positionalMap, isDefaultCommand);
        }
        else if (strictOptions) {
            validation.unknownArguments(argv, aliases, {}, false, false);
        }
        validation.customChecks(argv, aliases);
        validation.limitedChoices(argv);
        validation.implications(argv);
        validation.conflicting(argv);
    };
    function guessLocale() {
        if (!detectLocale)
            return;
        const locale = shim.getEnv('LC_ALL') ||
            shim.getEnv('LC_MESSAGES') ||
            shim.getEnv('LANG') ||
            shim.getEnv('LANGUAGE') ||
            'en_US';
        self.locale(locale.replace(/[.:].*/, ''));
    }
    self.help();
    self.version();
    return self;
}
export const rebase = (base, dir) => shim.path.relative(base, dir);
export function isYargsInstance(y) {
    return !!y && typeof y._parseArgs === 'function';
}


code:
export class YError extends Error {
    constructor(msg) {
        super(msg || 'yargs error');
        this.name = 'YError';
        Error.captureStackTrace(this, YError);
    }
}

license: mit


code:
import {applyExtends as _applyExtends} from '../build/lib/utils/apply-extends.js';
import {hideBin} from '../build/lib/utils/process-argv.js';
import Parser from 'yargs-parser';
import shim from '../lib/platform-shims/esm.mjs';

const applyExtends = (config, cwd, mergeExtends) => {
  return _applyExtends(config, cwd, mergeExtends, shim);
};

export {applyExtends, hideBin, Parser};


code:
const {
  applyExtends,
  cjsPlatformShim,
  Parser,
  processArgv,
} = require('../build/index.cjs');

module.exports = {
  applyExtends: (config, cwd, mergeExtends) => {
    return applyExtends(config, cwd, mergeExtends, cjsPlatformShim);
  },
  hideBin: processArgv.hideBin,
  Parser,
};


code:
'use strict';
// classic singleton yargs API, to use yargs
// without running as a singleton do:
// require('yargs/yargs')(process.argv.slice(2))
const {Yargs, processArgv} = require('./build/index.cjs');

Argv(processArgv.hideBin(process.argv));

module.exports = Argv;

function Argv(processArgs, cwd) {
  const argv = Yargs(processArgs, cwd, require);
  singletonify(argv);
  return argv;
}

/*  Hack an instance of Argv with process.argv into Argv
    so people can do
    require('yargs')(['--beeble=1','-z','zizzle']).argv
    to parse a list of args and
    require('yargs').argv
    to get a parsed version of process.argv.
*/
function singletonify(inst) {
  Object.keys(inst).forEach(key => {
    if (key === 'argv') {
      Argv.__defineGetter__(key, inst.__lookupGetter__(key));
    } else if (typeof inst[key] === 'function') {
      Argv[key] = inst[key].bind(inst);
    } else {
      Argv.__defineGetter__('$0', () => {
        return inst.$0;
      });
      Argv.__defineGetter__('parsed', () => {
        return inst.parsed;
      });
    }
  });
}


code:
'use strict';

// Bootstraps yargs for ESM:
import esmPlatformShim from './lib/platform-shims/esm.mjs';
import {YargsWithShim} from './build/lib/yargs-factory.js';

const Yargs = YargsWithShim(esmPlatformShim);
export default Yargs;


code:
'use strict';

import cliui from 'https://unpkg.com/cliui@7.0.1/index.mjs'; // eslint-disable-line
import Parser from 'https://unpkg.com/yargs-parser@19.0.0/browser.js'; // eslint-disable-line
import {getProcessArgvBin} from '../../build/lib/utils/process-argv.js';
import {YError} from '../../build/lib/yerror.js';

const REQUIRE_ERROR = 'require is not supported in browser';
const REQUIRE_DIRECTORY_ERROR =
  'loading a directory of commands is not supported in browser';

export default {
  assert: {
    notStrictEqual: (a, b) => {
      // noop.
    },
    strictEqual: (a, b) => {
      // noop.
    },
  },
  cliui,
  findUp: () => undefined,
  getEnv: key => {
    // There is no environment in browser:
    return undefined;
  },
  inspect: console.log,
  getCallerFile: () => {
    throw new YError(REQUIRE_DIRECTORY_ERROR);
  },
  getProcessArgvBin,
  mainFilename: 'yargs',
  Parser,
  path: {
    basename: str => str,
    dirname: str => str,
    extname: str => str,
    relative: str => str,
  },
  process: {
    argv: () => [],
    cwd: () => '',
    execPath: () => '',
    // exit is noop browser:
    exit: () => {},
    nextTick: cb => {
      window.setTimeout(cb, 1);
    },
    stdColumns: 80,
  },
  readFileSync: () => {
    return '';
  },
  require: () => {
    throw new YError(REQUIRE_ERROR);
  },
  requireDirectory: () => {
    throw new YError(REQUIRE_DIRECTORY_ERROR);
  },
  stringWidth: str => {
    return [...str].length;
  },
  // TODO: replace this with y18n once it's ported to ESM:
  y18n: {
    __: (...str) => {
      if (str.length === 0) return '';
      const args = str.slice(1);
      return sprintf(str[0], ...args);
    },
    __n: (str1, str2, count, ...args) => {
      if (count === 1) {
        return sprintf(str1, ...args);
      } else {
        return sprintf(str2, ...args);
      }
    },
    getLocale: () => {
      return 'en_US';
    },
    setLocale: () => {},
    updateLocale: () => {},
  },
};

function sprintf(_str, ...args) {
  let str = '';
  const split = _str.split('%s');
  split.forEach((token, i) => {
    str += `${token}${split[i + 1] !== undefined && args[i] ? args[i] : ''}`;
  });
  return str;
}


code:
'use strict'

import { notStrictEqual, strictEqual } from 'assert'
import cliui from 'cliui'
import escalade from 'escalade/sync'
import { format, inspect } from 'util'
import { readFileSync } from 'fs'
import { fileURLToPath } from 'url';
import Parser from 'yargs-parser'
import { basename, dirname, extname, relative, resolve } from 'path'
import { getProcessArgvBin } from '../../build/lib/utils/process-argv.js'
import { YError } from '../../build/lib/yerror.js'
import y18n from 'y18n'

const REQUIRE_ERROR = 'require is not supported by ESM'
const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM'

const mainFilename = fileURLToPath(import.meta.url).split('node_modules')[0]
const __dirname = fileURLToPath(import.meta.url)

export default {
  assert: {
    notStrictEqual,
    strictEqual
  },
  cliui,
  findUp: escalade,
  getEnv: (key) => {
    return process.env[key]
  },
  inspect,
  getCallerFile: () => {
    throw new YError(REQUIRE_DIRECTORY_ERROR)
  },
  getProcessArgvBin,
  mainFilename: mainFilename || process.cwd(),
  Parser,
  path: {
    basename,
    dirname,
    extname,
    relative,
    resolve
  },
  process: {
    argv: () => process.argv,
    cwd: process.cwd,
    execPath: () => process.execPath,
    exit: process.exit,
    nextTick: process.nextTick,
    stdColumns: typeof process.stdout.columns !== 'undefined' ? process.stdout.columns : null
  },
  readFileSync,
  require: () => {
    throw new YError(REQUIRE_ERROR)
  },
  requireDirectory: () => {
    throw new YError(REQUIRE_DIRECTORY_ERROR)
  },
  stringWidth: (str) => {
    return [...str].length
  },
  y18n: y18n({
    directory: resolve(__dirname, '../../../locales'),
    updateFiles: false
  })
}


Commands: Каманды:

Examples: Прыклады:

boolean: булевы тып

count: падлік

string: радковы тып

number: лік

array: масіў

required: неабходна

default: па змаўчанні

default: па змаўчанні:

aliases: аліасы:

generated-value: згенераванае значэнне

one: Недастаткова неапцыйных аргументаў: ёсць %s, трэба як мінімум %s

one: Занадта шмат неапцыйных аргументаў: ёсць %s, максімум дапушчальна %s

one: Не хапае значэння аргументу: %s

other: Не хапае значэнняў аргументаў: %s

one: Не хапае неабходнага аргументу: %s

other: Не хапае неабходных аргументаў: %s

one: Невядомы аргумент: %s

other: Невядомыя аргументы: %s

Invalid values: Несапраўдныя значэння:

Argument: %s, Given: %s, Choices: %s: Аргумент: %s, Дадзенае значэнне: %s, Магчымасці: %s

Argument check failed: %s: Праверка аргументаў не ўдалася: %s

Implications failed: Дадзены аргумент патрабуе наступны дадатковы аргумент:

Not enough arguments following: %s: Недастаткова наступных аргументаў: %s

Invalid JSON config file: %s: Несапраўдны файл канфігурацыі JSON: %s

Path to JSON config file: Шлях да файла канфігурацыі JSON

Show help: Паказаць дапамогу

Show version number: Паказаць нумар версіі

Did you mean %s?: Вы мелі на ўвазе %s?


Commands: Kommandos:

Examples: Beispiele:

boolean: boolean

count: Zähler

string: string

number: Zahl

array: array

required: erforderlich

default: Standard

default: Standard:

aliases: Aliase:

generated-value: Generierter-Wert

one: Nicht genügend Argumente ohne Optionen: %s vorhanden, mindestens %s benötigt

one: Zu viele Argumente ohne Optionen: %s vorhanden, maximal %s erlaubt

one: Fehlender Argumentwert: %s

other: Fehlende Argumentwerte: %s

one: Fehlendes Argument: %s

other: Fehlende Argumente: %s

one: Unbekanntes Argument: %s

other: Unbekannte Argumente: %s

Invalid values: Unzulässige Werte:

Argument: %s, Given: %s, Choices: %s: Argument: %s, Gegeben: %s, Möglichkeiten: %s

Argument check failed: %s: Argumente-Check fehlgeschlagen: %s

Implications failed: Fehlende abhängige Argumente:

Not enough arguments following: %s: Nicht genügend Argumente nach: %s

Invalid JSON config file: %s: Fehlerhafte JSON-Config Datei: %s

Path to JSON config file: Pfad zur JSON-Config Datei

Show help: Hilfe anzeigen

Show version number: Version anzeigen

Did you mean %s?: Meintest du %s?


Commands: Commands:

Examples: Examples:

count: count

number: number

required: required

default: default

default: default:

aliases: aliases:

generated-value: generated-value

one: Not enough non-option arguments: got %s, need at least %s

one: Too many non-option arguments: got %s, maximum of %s

one: Missing argument value: %s

other: Missing argument values: %s

one: Missing required argument: %s

other: Missing required arguments: %s

one: Unknown argument: %s

other: Unknown arguments: %s

Invalid values: Invalid values:

Argument: %s, Given: %s, Choices: %s: Argument: %s, Given: %s, Choices: %s

Argument check failed: %s: Argument check failed: %s

Implications failed: Missing dependent arguments:

Not enough arguments following: %s: Not enough arguments following: %s

Invalid JSON config file: %s: Invalid JSON config file: %s

Path to JSON config file: Path to JSON config file

Show help: Show help

Show version number: Show version number

Did you mean %s?: Did you mean %s?

Arguments %s and %s are mutually exclusive: Arguments %s and %s are mutually exclusive

Positionals: Positionals:

command: command

deprecated: deprecated

deprecated: %s: deprecated: %s


Commands: Comandos:

Examples: Ejemplos:

boolean: booleano

count: cuenta

string: cadena de caracteres

number: número

array: tabla

required: requerido

default: defecto

default: defecto:

aliases: alias:

generated-value: valor-generado

one: Hacen falta argumentos no-opcionales: Número recibido %s, necesita por lo menos %s

one: Demasiados argumentos no-opcionales: Número recibido %s, máximo es %s

one: Falta argumento: %s

other: Faltan argumentos: %s

one: Falta argumento requerido: %s

other: Faltan argumentos requeridos: %s

one: Argumento desconocido: %s

other: Argumentos desconocidos: %s

Invalid values: Valores inválidos:

Argument: %s, Given: %s, Choices: %s: Argumento: %s, Recibido: %s, Seleccionados: %s

Argument check failed: %s: Verificación de argumento ha fallado: %s

Implications failed: Implicaciones fallidas:

Not enough arguments following: %s: No hay suficientes argumentos después de: %s

Invalid JSON config file: %s: Archivo de configuración JSON inválido: %s

Path to JSON config file: Ruta al archivo de configuración JSON

Show help: Muestra ayuda

Show version number: Muestra número de versión

Did you mean %s?: Quisiste decir %s?


Commands: Komennot:

Examples: Esimerkkejä:

boolean: totuusarvo

count: lukumäärä

string: merkkijono

number: numero

array: taulukko

required: pakollinen

default: oletusarvo

default: oletusarvo:

aliases: aliakset:

generated-value: generoitu-arvo

one: Liian vähän argumentteja, jotka eivät ole valintoja: annettu %s, vaaditaan vähintään %s

one: Liikaa argumentteja, jotka eivät ole valintoja: annettu %s, sallitaan enintään %s

one: Argumentin arvo puuttuu: %s

other: Argumentin arvot puuttuvat: %s

one: Pakollinen argumentti puuttuu: %s

other: Pakollisia argumentteja puuttuu: %s

one: Tuntematon argumenttn: %s

other: Tuntemattomia argumentteja: %s

Invalid values: Virheelliset arvot:

Argument: %s, Given: %s, Choices: %s: Argumentti: %s, Annettu: %s, Vaihtoehdot: %s

Argument check failed: %s: Argumentin tarkistus epäonnistui: %s

Implications failed: Riippuvia argumentteja puuttuu:

Not enough arguments following: %s: Argumentin perässä ei ole tarpeeksi argumentteja: %s

Invalid JSON config file: %s: Epävalidi JSON-asetustiedosto: %s

Path to JSON config file: JSON-asetustiedoston polku

Show help: Näytä ohje

Show version number: Näytä versionumero

Did you mean %s?: Tarkoititko %s?

Arguments %s and %s are mutually exclusive: Argumentit %s ja %s eivät ole yhteensopivat

Positionals: Sijaintiparametrit:

command: komento


Commands: Commandes :

Examples: Exemples :

boolean: booléen

count: compteur

string: chaîne de caractères

number: nombre

array: tableau

required: requis

default: défaut

default: défaut :

aliases: alias :

generated-value: valeur générée

one: Pas assez d'arguments (hors options) : reçu %s, besoin d'au moins %s

other: Pas assez d'arguments (hors options) : reçus %s, besoin d'au moins %s

one: Trop d'arguments (hors options) : reçu %s, maximum de %s

other: Trop d'arguments (hors options) : reçus %s, maximum de %s

one: Argument manquant : %s

other: Arguments manquants : %s

one: Argument requis manquant : %s

other: Arguments requis manquants : %s

one: Argument inconnu : %s

other: Arguments inconnus : %s

one: Commande inconnue : %s

other: Commandes inconnues : %s

Invalid values: Valeurs invalides :

Argument: %s, Given: %s, Choices: %s: Argument : %s, donné : %s, choix : %s

Argument check failed: %s: Echec de la vérification de l'argument : %s

Implications failed: Arguments dépendants manquants :

Not enough arguments following: %s: Pas assez d'arguments après : %s

Invalid JSON config file: %s: Fichier de configuration JSON invalide : %s

Path to JSON config file: Chemin du fichier de configuration JSON

Show help: Affiche l'aide

Show version number: Affiche le numéro de version

Did you mean %s?: Vouliez-vous dire %s ?

Arguments %s and %s are mutually exclusive: Les arguments %s et %s sont mutuellement exclusifs

Positionals: Arguments positionnels :

command: commande


Commands: आदेश:

Examples: उदाहरण:

boolean: सत्यता

count: संख्या

string: वर्णों का तार

number: अंक

array: सरणी

required: आवश्यक

default: डिफॉल्ट

default: डिफॉल्ट:

aliases: उपनाम:

generated-value: उत्पन्न-मूल्य

one: पर्याप्त गैर-विकल्प तर्क प्राप्त नहीं: %s प्राप्त, कम से कम %s की आवश्यकता है

one: बहुत सारे गैर-विकल्प तर्क: %s प्राप्त, अधिकतम %s मान्य

one: कुछ तर्को के मूल्य गुम हैं: %s

other: कुछ तर्को के मूल्य गुम हैं: %s

one: आवश्यक तर्क गुम हैं: %s

other: आवश्यक तर्क गुम हैं: %s

one: अज्ञात तर्क प्राप्त: %s

other: अज्ञात तर्क प्राप्त: %s

Invalid values: अमान्य मूल्य:

Argument: %s, Given: %s, Choices: %s: तर्क: %s, प्राप्त: %s, विकल्प: %s

Argument check failed: %s: तर्क जांच विफल: %s

Implications failed: दिए गए तर्क के लिए अतिरिक्त तर्क की अपेक्षा है:

Not enough arguments following: %s: निम्नलिखित के बाद पर्याप्त तर्क नहीं प्राप्त: %s

Invalid JSON config file: %s: अमान्य JSON config फाइल: %s

Path to JSON config file: JSON config फाइल का पथ

Show help: सहायता दिखाएँ

Show version number: Version संख्या दिखाएँ

Did you mean %s?: क्या आपका मतलब है %s?

Arguments %s and %s are mutually exclusive: तर्क %s और %s परस्पर अनन्य हैं

Positionals: स्थानीय:

command: आदेश


Commands: Parancsok:

Examples: Példák:

count: számláló

string: szöveg

number: szám

array: tömb

required: kötelező

default: alapértelmezett

default: alapértelmezett:

aliases: aliaszok:

generated-value: generált-érték

one: Nincs elég nem opcionális argumentum: %s van, legalább %s kell

one: Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet

one: Hiányzó argumentum érték: %s

other: Hiányzó argumentum értékek: %s

one: Hiányzó kötelező argumentum: %s

other: Hiányzó kötelező argumentumok: %s

one: Ismeretlen argumentum: %s

other: Ismeretlen argumentumok: %s

Invalid values: Érvénytelen érték:

Argument: %s, Given: %s, Choices: %s: Argumentum: %s, Megadott: %s, Lehetőségek: %s

Argument check failed: %s: Argumentum ellenőrzés sikertelen: %s

Implications failed: Implikációk sikertelenek:

Not enough arguments following: %s: Nem elég argumentum követi: %s

Invalid JSON config file: %s: Érvénytelen JSON konfigurációs file: %s

Path to JSON config file: JSON konfigurációs file helye

Show help: Súgo megjelenítése

Show version number: Verziószám megjelenítése

Did you mean %s?: Erre gondoltál %s?


Commands: Perintah:

Examples: Contoh:

count: jumlah

number: nomor

array: larik

required: diperlukan

default: bawaan

default: bawaan:

aliases: istilah lain:

generated-value: nilai-yang-dihasilkan

one: Argumen wajib kurang: hanya %s, minimal %s

one: Terlalu banyak argumen wajib: ada %s, maksimal %s

one: Kurang argumen: %s

other: Kurang argumen: %s

one: Kurang argumen wajib: %s

other: Kurang argumen wajib: %s

one: Argumen tak diketahui: %s

other: Argumen tak diketahui: %s

Invalid values: Nilai-nilai tidak valid:

Argument: %s, Given: %s, Choices: %s: Argumen: %s, Diberikan: %s, Pilihan: %s

Argument check failed: %s: Pemeriksaan argument gagal: %s

Implications failed: Implikasi gagal:

Not enough arguments following: %s: Kurang argumen untuk: %s

Invalid JSON config file: %s: Berkas konfigurasi JSON tidak valid: %s

Path to JSON config file: Alamat berkas konfigurasi JSON

Show help: Lihat bantuan

Show version number: Lihat nomor versi

Did you mean %s?: Maksud Anda: %s?

Arguments %s and %s are mutually exclusive: Argumen %s dan %s saling eksklusif

Positionals: Posisional-posisional:

command: perintah


Commands: Comandi:

Examples: Esempi:

count: contatore

string: stringa

array: vettore

required: richiesto

default: predefinito

default: predefinito:

generated-value: valore generato

one: Numero insufficiente di argomenti non opzione: inseriti %s, richiesti almeno %s

one: Troppi argomenti non opzione: inseriti %s, massimo possibile %s

one: Argomento mancante: %s

other: Argomenti mancanti: %s

one: Argomento richiesto mancante: %s

other: Argomenti richiesti mancanti: %s

one: Argomento sconosciuto: %s

other: Argomenti sconosciuti: %s

Invalid values: Valori non validi:

Argument: %s, Given: %s, Choices: %s: Argomento: %s, Richiesto: %s, Scelte: %s

Argument check failed: %s: Controllo dell'argomento fallito: %s

Implications failed: Argomenti dipendenti mancanti:

Not enough arguments following: %s: Argomenti insufficienti dopo: %s

Invalid JSON config file: %s: File di configurazione JSON non valido: %s

Path to JSON config file: Percorso del file di configurazione JSON

Show help: Mostra la schermata di aiuto

Show version number: Mostra il numero di versione

Did you mean %s?: Intendi forse %s?


Commands: コマンド:

Examples: 例:

boolean: 真偽

count: カウント

string: 文字列

number: 数値

array: 配列

required: 必須

default: デフォルト

default: デフォルト:

aliases: エイリアス:

generated-value: 生成された値

one: オプションではない引数が %s 個では不足しています。少なくとも %s 個の引数が必要です:

one: オプションではない引数が %s 個では多すぎます。最大で %s 個までです:

other: オプションではない引数が %s 個では多すぎます。最大で %s 個までです:

one: 引数の値が見つかりません: %s

other: 引数の値が見つかりません: %s

one: 必須の引数が見つかりません: %s

other: 必須の引数が見つかりません: %s

one: 未知の引数です: %s

other: 未知の引数です: %s

Invalid values: 不正な値です:

Argument: %s, Given: %s, Choices: %s: 引数は %s です。与えられた値: %s, 選択してください: %s

Argument check failed: %s: 引数のチェックに失敗しました: %s

Implications failed: オプションの組み合わせで不正が生じました:

Not enough arguments following: %s: 次の引数が不足しています。: %s

Invalid JSON config file: %s: JSONの設定ファイルが不正です: %s

Path to JSON config file: JSONの設定ファイルまでのpath

Show help: ヘルプを表示

Show version number: バージョンを表示

Did you mean %s?: もしかして %s?

Arguments %s and %s are mutually exclusive: 引数 %s と %s は同時に指定できません

Positionals: 位置:

command: コマンド

deprecated: 非推奨

deprecated: %s: 非推奨: %s


Commands: 명령:

Examples: 예시:

boolean: 여부

count: 개수

string: 문자열

number: 숫자

array: 배열

required: 필수

default: 기본

default: 기본:

aliases: 별칭:

generated-value: 생성된 값

one: 옵션이 아닌 인자가 충분치 않습니다: %s개를 받았지만, 적어도 %s개는 필요합니다

one: 옵션이 아닌 인자가 너무 많습니다: %s개를 받았지만, %s개 이하여야 합니다

one: 인자값을 받지 못했습니다: %s

other: 인자값들을 받지 못했습니다: %s

one: 필수 인자를 받지 못했습니다: %s

other: 필수 인자들을 받지 못했습니다: %s

one: 알 수 없는 인자입니다: %s

other: 알 수 없는 인자들입니다: %s

Invalid values: 잘못된 값입니다:

Argument: %s, Given: %s, Choices: %s: 인자: %s, 입력받은 값: %s, 선택지: %s

Argument check failed: %s: 유효하지 않은 인자입니다: %s

Implications failed: 옵션의 조합이 잘못되었습니다:

Not enough arguments following: %s: 인자가 충분하게 주어지지 않았습니다: %s

Invalid JSON config file: %s: 유효하지 않은 JSON 설정파일입니다: %s

Path to JSON config file: JSON 설정파일 경로

Show help: 도움말을 보여줍니다

Show version number: 버전 넘버를 보여줍니다

Did you mean %s?: 찾고계신게 %s입니까?

Arguments %s and %s are mutually exclusive: %s와 %s 인자는 같이 사용될 수 없습니다

Positionals: 위치:

command: 명령


Commands: Kommandoer:

Examples: Eksempler:

boolean: boolsk

count: antall

string: streng

number: nummer

array: matrise

required: obligatorisk

default: standard

default: standard:

generated-value: generert-verdi

one: Ikke nok ikke-alternativ argumenter: fikk %s, trenger minst %s

one: For mange ikke-alternativ argumenter: fikk %s, maksimum %s

one: Mangler argument verdi: %s

other: Mangler argument verdier: %s

one: Mangler obligatorisk argument: %s

other: Mangler obligatoriske argumenter: %s

one: Ukjent argument: %s

other: Ukjente argumenter: %s

Invalid values: Ugyldige verdier:

Argument: %s, Given: %s, Choices: %s: Argument: %s, Gitt: %s, Valg: %s

Argument check failed: %s: Argumentsjekk mislyktes: %s

Implications failed: Konsekvensene mislyktes:

Not enough arguments following: %s: Ikke nok følgende argumenter: %s

Invalid JSON config file: %s: Ugyldig JSON konfigurasjonsfil: %s

Path to JSON config file: Bane til JSON konfigurasjonsfil

Show help: Vis hjelp

Show version number: Vis versjonsnummer


Commands: Commando's:

Examples: Voorbeelden:

boolean: booleaans

count: aantal

number: getal

array: lijst

required: verplicht

default: standaard

default: standaard:

aliases: aliassen:

generated-value: gegenereerde waarde

one: Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig

one: Te veel niet-optie-argumenten: %s gekregen, maximum is %s

one: Missende argumentwaarde: %s

other: Missende argumentwaarden: %s

one: Missend verplicht argument: %s

other: Missende verplichte argumenten: %s

one: Onbekend argument: %s

other: Onbekende argumenten: %s

Invalid values: Ongeldige waarden:

Argument: %s, Given: %s, Choices: %s: Argument: %s, Gegeven: %s, Keuzes: %s

Argument check failed: %s: Argumentcontrole mislukt: %s

Implications failed: Ontbrekende afhankelijke argumenten:

Not enough arguments following: %s: Niet genoeg argumenten na: %s

Invalid JSON config file: %s: Ongeldig JSON-config-bestand: %s

Path to JSON config file: Pad naar JSON-config-bestand

Show help: Toon help

Show version number: Toon versienummer

Did you mean %s?: Bedoelde u misschien %s?

Arguments %s and %s are mutually exclusive: Argumenten %s en %s kunnen niet tegelijk gebruikt worden

Positionals: Positie-afhankelijke argumenten

command: commando


Commands: Kommandoar:

Examples: Døme:

count: mengd

one: Ikkje nok ikkje-alternativ argument: fekk %s, treng minst %s

one: For mange ikkje-alternativ argument: fekk %s, maksimum %s

one: Manglar argumentverdi: %s

other: Manglar argumentverdiar: %s

one: Manglar obligatorisk argument: %s

other: Manglar obligatoriske argument: %s

other: Ukjende argument: %s

Invalid values: Ugyldige verdiar:

Argument: %s, Given: %s, Choices: %s: Argument: %s, Gjeve: %s, Val: %s

Argument check failed: %s: Argumentsjekk mislukkast: %s

Implications failed: Konsekvensane mislukkast:

Not enough arguments following: %s: Ikkje nok fylgjande argument: %s


Commands: Choose yer command:

Examples: Ex. marks the spot:

required: requi-yar-ed

one: Ye be havin' to set the followin' argument land lubber: %s

other: Ye be havin' to set the followin' arguments land lubber: %s

Show help: Parlay this here code of conduct

Show version number: 'Tis the version ye be askin' fer

Arguments %s and %s are mutually exclusive: Yon scurvy dogs %s and %s be as bad as rum and a prudish wench


Commands: Polecenia:

Examples: Przykłady:

count: ilość

string: ciąg znaków

number: liczba

array: tablica

required: wymagany

default: domyślny

default: domyślny:

aliases: aliasy:

generated-value: wygenerowana-wartość

one: Niewystarczająca ilość argumentów: otrzymano %s, wymagane co najmniej %s

one: Zbyt duża ilość argumentów: otrzymano %s, wymagane co najwyżej %s

one: Brak wartości dla argumentu: %s

other: Brak wartości dla argumentów: %s

one: Brak wymaganego argumentu: %s

other: Brak wymaganych argumentów: %s

one: Nieznany argument: %s

other: Nieznane argumenty: %s

Invalid values: Nieprawidłowe wartości:

Argument: %s, Given: %s, Choices: %s: Argument: %s, Otrzymano: %s, Dostępne: %s

Argument check failed: %s: Weryfikacja argumentów nie powiodła się: %s

Implications failed: Założenia nie zostały spełnione:

Not enough arguments following: %s: Niewystarczająca ilość argumentów następujących po: %s

Invalid JSON config file: %s: Nieprawidłowy plik konfiguracyjny JSON: %s

Path to JSON config file: Ścieżka do pliku konfiguracyjnego JSON

Show help: Pokaż pomoc

Show version number: Pokaż numer wersji

Did you mean %s?: Czy chodziło Ci o %s?

Arguments %s and %s are mutually exclusive: Argumenty %s i %s wzajemnie się wykluczają

Positionals: Pozycyjne:

command: polecenie


Examples: Exemplos:

count: contagem

string: cadeia de caracteres

array: arranjo

default: padrão

default: padrão:

generated-value: valor-gerado

one: Argumentos insuficientes não opcionais: Argumento %s, necessário pelo menos %s

one: Excesso de argumentos não opcionais: recebido %s, máximo de %s

one: Falta valor de argumento: %s

other: Falta valores de argumento: %s

one: Falta argumento obrigatório: %s

other: Faltando argumentos obrigatórios: %s

one: Argumento desconhecido: %s

other: Argumentos desconhecidos: %s

Argument: %s, Given: %s, Choices: %s: Argumento: %s, Dado: %s, Escolhas: %s

Argument check failed: %s: Verificação de argumento falhou: %s

Implications failed: Implicações falharam:

Not enough arguments following: %s: Insuficientes argumentos a seguir: %s

Invalid JSON config file: %s: Arquivo de configuração em JSON esta inválido: %s

Path to JSON config file: Caminho para o arquivo de configuração em JSON

Show help: Mostra ajuda

Show version number: Mostra número de versão

Arguments %s and %s are mutually exclusive: Argumentos %s e %s são mutualmente exclusivos


required: obrigatório

aliases: sinônimos:

one: Argumentos insuficientes: Argumento %s, necessário pelo menos %s

one: Excesso de argumentos: recebido %s, máximo de %s

Argument: %s, Given: %s, Choices: %s: Argumento: %s, Dado: %s, Opções: %s

Not enough arguments following: %s: Argumentos insuficientes a seguir: %s

Invalid JSON config file: %s: Arquivo JSON de configuração inválido: %s

Path to JSON config file: Caminho para o arquivo JSON de configuração

Show help: Exibe ajuda

Show version number: Exibe a versão

Did you mean %s?: Você quis dizer %s?

Positionals: Posicionais:

command: comando


Commands: Команды:

Examples: Примеры:

boolean: булевый тип

count: подсчет

string: строковой тип

number: число

array: массив

required: необходимо

default: по умолчанию

default: по умолчанию:

choices: возможности:

aliases: алиасы:

generated-value: генерированное значение

one: Недостаточно неопционных аргументов: есть %s, нужно как минимум %s

one: Слишком много неопционных аргументов: есть %s, максимум допустимо %s

one: Не хватает значения аргумента: %s

other: Не хватает значений аргументов: %s

one: Не хватает необходимого аргумента: %s

other: Не хватает необходимых аргументов: %s

one: Неизвестный аргумент: %s

other: Неизвестные аргументы: %s

Invalid values: Недействительные значения:

Argument: %s, Given: %s, Choices: %s: Аргумент: %s, Данное значение: %s, Возможности: %s

Argument check failed: %s: Проверка аргументов не удалась: %s

Implications failed: Данный аргумент требует следующий дополнительный аргумент:

Not enough arguments following: %s: Недостаточно следующих аргументов: %s

Invalid JSON config file: %s: Недействительный файл конфигурации JSON: %s

Path to JSON config file: Путь к файлу конфигурации JSON

Show help: Показать помощь

Show version number: Показать номер версии

Did you mean %s?: Вы имели в виду %s?


Commands: คอมมาน

Examples: ตัวอย่าง

boolean: บูลีน

count: นับ

string: สตริง

number: ตัวเลข

array: อาเรย์

required: จำเป็น

default: ค่าเริ่มต้

default: ค่าเริ่มต้น

aliases: เอเลียส

generated-value: ค่าที่ถูกสร้างขึ้น

one: ใส่อาร์กิวเมนต์ไม่ครบตามจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการอย่างน้อย %s ค่า

one: ใส่อาร์กิวเมนต์เกินจำนวนที่กำหนด: ใส่ค่ามาจำนวน %s ค่า, แต่ต้องการมากที่สุด %s ค่า

one: ค่าอาร์กิวเมนต์ที่ขาดไป: %s

other: ค่าอาร์กิวเมนต์ที่ขาดไป: %s

one: อาร์กิวเมนต์จำเป็นที่ขาดไป: %s

other: อาร์กิวเมนต์จำเป็นที่ขาดไป: %s

one: อาร์กิวเมนต์ที่ไม่รู้จัก: %s

other: อาร์กิวเมนต์ที่ไม่รู้จัก: %s

Invalid values: ค่าไม่ถูกต้อง:

Argument: %s, Given: %s, Choices: %s: อาร์กิวเมนต์: %s, ได้รับ: %s, ตัวเลือก: %s

Argument check failed: %s: ตรวจสอบพบอาร์กิวเมนต์ที่ไม่ถูกต้อง: %s

Implications failed: Implications ไม่สำเร็จ:

Not enough arguments following: %s: ใส่อาร์กิวเมนต์ไม่ครบ: %s

Invalid JSON config file: %s: ไฟล์คอนฟิค JSON ไม่ถูกต้อง: %s

Path to JSON config file: พาทไฟล์คอนฟิค JSON

Show help: ขอความช่วยเหลือ

Show version number: แสดงตัวเลขเวอร์ชั่น

Did you mean %s?: คุณหมายถึง %s?


Commands: Komutlar:

Examples: Örnekler:

count: sayı

number: numara

required: zorunlu

default: varsayılan

default: varsayılan:

aliases: takma adlar:

generated-value: oluşturulan-değer

one: Seçenek dışı argümanlar yetersiz: %s bulundu, %s gerekli

one: Seçenek dışı argümanlar gereğinden fazla: %s bulundu, azami %s

one: Eksik argüman değeri: %s

other: Eksik argüman değerleri: %s

one: Eksik zorunlu argüman: %s

other: Eksik zorunlu argümanlar: %s

one: Bilinmeyen argüman: %s

other: Bilinmeyen argümanlar: %s

Invalid values: Geçersiz değerler:

Argument: %s, Given: %s, Choices: %s: Argüman: %s, Verilen: %s, Seçimler: %s

Argument check failed: %s: Argüman kontrolü başarısız oldu: %s

Implications failed: Sonuçlar başarısız oldu:

Not enough arguments following: %s: %s için yeterli argüman bulunamadı

Invalid JSON config file: %s: Geçersiz JSON yapılandırma dosyası: %s

Path to JSON config file: JSON yapılandırma dosya konumu

Show help: Yardım detaylarını göster

Show version number: Versiyon detaylarını göster

Did you mean %s?: Bunu mu demek istediniz: %s?

Positionals: Sıralılar:

command: komut


Commands: 命令：

Examples: 示例：

boolean: 布尔

count: 计数

string: 字符串

number: 数字

array: 数组

required: 必需

default: 默认值

default: 默认值:

generated-value: 生成的值

one: 缺少 non-option 参数：传入了 %s 个, 至少需要 %s 个

other: 缺少 non-option 参数：传入了 %s 个, 至少需要 %s 个

one: non-option 参数过多：传入了 %s 个, 最大允许 %s 个

other: non-option 参数过多：传入了 %s 个, 最大允许 %s 个

one: 没有给此选项指定值：%s

other: 没有给这些选项指定值：%s

one: 缺少必须的选项：%s

other: 缺少这些必须的选项：%s

one: 无法识别的选项：%s

other: 无法识别这些选项：%s

Invalid values: 无效的选项值：

Argument: %s, Given: %s, Choices: %s: 选项名称: %s, 传入的值: %s, 可选的值：%s

Argument check failed: %s: 选项值验证失败：%s

Implications failed: 缺少依赖的选项：

Not enough arguments following: %s: 没有提供足够的值给此选项：%s

Invalid JSON config file: %s: 无效的 JSON 配置文件：%s

Path to JSON config file: JSON 配置文件的路径

Show help: 显示帮助信息

Show version number: 显示版本号

Did you mean %s?: 是指 %s?

Arguments %s and %s are mutually exclusive: 选项 %s 和 %s 是互斥的

Positionals: 位置：

command: 命令


Examples: 例：

boolean: 布林

count: 次數

string: 字串

number: 數字

array: 陣列

default: 預設值

default: 預設值:

aliases: 別名:

one: non-option 引數不足：只傳入了 %s 個, 至少要 %s 個

other: non-option 引數不足：只傳入了 %s 個, 至少要 %s 個

one: non-option 引數過多：傳入了 %s 個, 但最多 %s 個

other: non-option 引數過多：傳入了 %s 個, 但最多 %s 個

one: 此引數無指定值：%s

other: 這些引數無指定值：%s

one: 缺少必須的引數：%s

other: 缺少這些必須的引數：%s

one: 未知的引數：%s

other: 未知的這些引數：%s

Invalid values: 無效的選項值：

Argument: %s, Given: %s, Choices: %s: 引數名稱: %s, 傳入的值: %s, 可選的值：%s

Argument check failed: %s: 引數驗證失敗：%s

Implications failed: 缺少依賴的選項：

Not enough arguments following: %s: 沒有提供足夠的值給此引數：%s

Invalid JSON config file: %s: 無效的 JSON 設置文件：%s

Path to JSON config file: JSON 設置文件的路徑

Show help: 顯示說明

Show version number: 顯示版本

Arguments %s and %s are mutually exclusive: 引數 %s 和 %s 是互斥的


yargs

description: yargs the modern, pirate-themed, successor to optimist.

require: ./yargs

type: module

fix: gts fix && npm run fix:js

fix:js: standardx --fix '**/*.mjs' && standardx --fix '**/*.cjs' && standardx --fix './*.mjs' && standardx --fix './*.cjs'

posttest: npm run check

test: c8 mocha ./test/*.cjs --require ./test/before.cjs --timeout=12000 --check-leaks

test:esm: c8 mocha ./test/esm/*.mjs --check-leaks

coverage: c8 report --check-coverage

prepare: npm run compile

pretest: npm run compile -- -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs

compile: rimraf build && tsc

postcompile: npm run build:cjs

build:cjs: rollup -c rollup.config.cjs

postbuild:cjs: rimraf ./build/index.cjs.d.ts

check: gts lint && npm run check:js

check:js: standardx '**/*.mjs' && standardx '**/*.cjs' && standardx './*.mjs' && standardx './*.cjs'

clean: gts clean

type: git

ignore: build helpers **/example/** **/platform-shims/esm.mjs

keywords: argument args option parser parsing cli command

license: MIT


code:
// TODO: consolidate on using a helpers file at some point in the future, which
// is the approach currently used to export Parser and applyExtends for ESM:
const {applyExtends, cjsPlatformShim, Parser, Yargs, processArgv} = require('./build/index.cjs')
Yargs.applyExtends = (config, cwd, mergeExtends) => {
  return applyExtends(config, cwd, mergeExtends, cjsPlatformShim)
}
Yargs.hideBin = processArgv.hideBin
Yargs.Parser = Parser
module.exports = Yargs