wishthis/node_modules/commander/index.js

28 lines
798 B
JavaScript
Raw Normal View History

2023-08-17 09:47:40 +00:00
const { Argument } = require('./lib/argument.js');
const { Command } = require('./lib/command.js');
const { CommanderError, InvalidArgumentError } = require('./lib/error.js');
const { Help } = require('./lib/help.js');
const { Option } = require('./lib/option.js');
2022-01-21 08:28:41 +00:00
2023-08-17 09:47:40 +00:00
// @ts-check
2022-01-21 08:28:41 +00:00
/**
* Expose the root command.
*/
exports = module.exports = new Command();
2023-08-17 09:47:40 +00:00
exports.program = exports; // More explicit access to global command.
// Implicit export of createArgument, createCommand, and createOption.
2022-01-21 08:28:41 +00:00
/**
2023-08-17 09:47:40 +00:00
* Expose classes
2022-01-21 08:28:41 +00:00
*/
2023-08-17 09:47:40 +00:00
exports.Argument = Argument;
2022-01-21 08:28:41 +00:00
exports.Command = Command;
2023-08-17 09:47:40 +00:00
exports.CommanderError = CommanderError;
exports.Help = Help;
exports.InvalidArgumentError = InvalidArgumentError;
exports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated
2022-01-21 08:28:41 +00:00
exports.Option = Option;