Compare commits
No commits in common. "01e4eaca5eac6fd00a86d7dfc5553e496e7fa4bc" and "6e00ba118ab23f8e6cda5bd50ec4220c159a7223" have entirely different histories.
01e4eaca5e
...
6e00ba118a
16
index.ts
16
index.ts
@ -1,10 +1,10 @@
|
|||||||
export { Parser, ParseError, ArgsResult } from './src/Parser.js';
|
export { Parser, ParseError, ArgsResult } from './src/Parser';
|
||||||
|
|
||||||
export { Command } from './src/classes/Command.js';
|
export { Command } from './src/classes/Command';
|
||||||
export { CommandOption } from './src/classes/CommandOption.js';
|
export { CommandOption } from './src/classes/CommandOption';
|
||||||
export { SubcommandGroupOption } from './src/classes/SubcommandGroupOption.js';
|
export { SubcommandGroupOption } from './src/classes/SubcommandGroupOption';
|
||||||
export { SubcommandOption } from './src/classes/SubcommandOption.js';
|
export { SubcommandOption } from './src/classes/SubcommandOption';
|
||||||
|
|
||||||
export { IResolver } from './src/interfaces/Resolver.js';
|
export { IResolver } from './src/interfaces/Resolver';
|
||||||
export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption.js';
|
export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption';
|
||||||
export { CommandDefinition } from './src/interfaces/Command.js';
|
export { CommandDefinition } from './src/interfaces/Command';
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@navy.gif/commandparser",
|
"name": "commandparser",
|
||||||
"version": "1.4.3",
|
"version": "1.4.0",
|
||||||
"description": "Parser meant to parse commands and their options for discord bots",
|
"description": "Parser meant to parse commands and their options for discord bots",
|
||||||
"author": "Navy.gif",
|
"author": "Navy.gif",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -10,9 +10,6 @@
|
|||||||
"main": "build/cjs/index.js",
|
"main": "build/cjs/index.js",
|
||||||
"module": "build/esm/index.js",
|
"module": "build/esm/index.js",
|
||||||
"types": "./build/esm/index.d.ts",
|
"types": "./build/esm/index.d.ts",
|
||||||
"files": [
|
|
||||||
"build/**/*"
|
|
||||||
],
|
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"import": "./build/esm/index.js",
|
"import": "./build/esm/index.js",
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
// eslint-disable-next-line max-classes-per-file
|
// eslint-disable-next-line max-classes-per-file
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
import Command from './classes/Command.js';
|
import Command from './classes/Command';
|
||||||
import CommandOption from './classes/CommandOption.js';
|
import CommandOption from './classes/CommandOption';
|
||||||
|
|
||||||
import { OptionType } from "./interfaces/CommandOption.js";
|
import { OptionType } from "./interfaces/CommandOption";
|
||||||
import IResolver from './interfaces/Resolver.js';
|
import IResolver from './interfaces/Resolver';
|
||||||
import ExtendedMap from "./util/Map.js";
|
import ExtendedMap from "./util/Map";
|
||||||
import Util from "./util/Util.js";
|
import Util from "./util/Util";
|
||||||
|
|
||||||
type ArgsResult = {
|
type ArgsResult = {
|
||||||
[key: string]: CommandOption
|
[key: string]: CommandOption
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { OptionType } from "../interfaces/CommandOption.js";
|
import { OptionType } from "../interfaces/CommandOption";
|
||||||
import { ICommand, CommandDefinition } from "../interfaces/Command.js";
|
import { ICommand, CommandDefinition } from "../interfaces/Command";
|
||||||
import SubcommandOption from "./SubcommandOption.js";
|
import SubcommandOption from "./SubcommandOption";
|
||||||
import SubcommandGroupOption from "./SubcommandGroupOption.js";
|
import SubcommandGroupOption from "./SubcommandGroupOption";
|
||||||
import CommandOption from "./CommandOption.js";
|
import CommandOption from "./CommandOption";
|
||||||
import { ArgsResult } from "../Parser.js";
|
import { ArgsResult } from "../Parser";
|
||||||
|
|
||||||
abstract class Command implements ICommand {
|
abstract class Command implements ICommand {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable no-undefined */
|
/* eslint-disable no-undefined */
|
||||||
import ICommandOption, { Choice, CommandOptionDefinition, DependsOnMode, OptionType, ParseResult } from "../interfaces/CommandOption.js";
|
import ICommandOption, { Choice, CommandOptionDefinition, DependsOnMode, OptionType, ParseResult } from "../interfaces/CommandOption";
|
||||||
import IResolver from "../interfaces/Resolver.js";
|
import IResolver from "../interfaces/Resolver";
|
||||||
|
|
||||||
class CommandOption implements ICommandOption {
|
class CommandOption implements ICommandOption {
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption.js";
|
import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption";
|
||||||
import CommandOption from "./CommandOption.js";
|
import CommandOption from "./CommandOption";
|
||||||
|
|
||||||
class SubcommandGroupOption extends CommandOption {
|
class SubcommandGroupOption extends CommandOption {
|
||||||
constructor (def: CommandOptionDefinition) {
|
constructor (def: CommandOptionDefinition) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption.js";
|
import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption";
|
||||||
import CommandOption from "./CommandOption.js";
|
import CommandOption from "./CommandOption";
|
||||||
|
|
||||||
class SubcommandOption extends CommandOption {
|
class SubcommandOption extends CommandOption {
|
||||||
constructor (def: CommandOptionDefinition) {
|
constructor (def: CommandOptionDefinition) {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import CommandOption from '../classes/CommandOption.js';
|
import CommandOption from '../classes/CommandOption';
|
||||||
import SubcommandGroupOption from '../classes/SubcommandGroupOption.js';
|
import SubcommandGroupOption from '../classes/SubcommandGroupOption';
|
||||||
import SubcommandOption from '../classes/SubcommandOption.js';
|
import SubcommandOption from '../classes/SubcommandOption';
|
||||||
import { ArgsResult } from '../Parser.js';
|
import { ArgsResult } from '../Parser';
|
||||||
import { CommandOptionDefinition } from './CommandOption.js';
|
import { CommandOptionDefinition } from './CommandOption';
|
||||||
|
|
||||||
|
|
||||||
interface ICommand {
|
interface ICommand {
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
// | 'FLOAT'
|
// | 'FLOAT'
|
||||||
// | 'POINTS'
|
// | 'POINTS'
|
||||||
|
|
||||||
import CommandOption from "../classes/CommandOption.js";
|
import CommandOption from "../classes/CommandOption";
|
||||||
import IResolver from "./Resolver.js";
|
import IResolver from "./Resolver";
|
||||||
|
|
||||||
enum OptionType {
|
enum OptionType {
|
||||||
SUB_COMMAND,
|
SUB_COMMAND,
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
/* Modules */
|
/* Modules */
|
||||||
"module": "ES2022", /* Specify what module code is generated. */
|
"module": "ES2022", /* Specify what module code is generated. */
|
||||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||||
"moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */
|
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||||
|
Loading…
Reference in New Issue
Block a user