Compare commits

..

3 Commits

Author SHA1 Message Date
01e4eaca5e
v1.4.3
Some checks failed
continuous-integration/drone/push Build is failing
2023-04-16 17:37:46 +03:00
062df84d7e
v1.4.2 2023-04-16 17:23:10 +03:00
06b52afe06
v1.4.1 2023-04-16 17:19:26 +03:00
10 changed files with 39 additions and 36 deletions

View File

@ -1,10 +1,10 @@
export { Parser, ParseError, ArgsResult } from './src/Parser'; export { Parser, ParseError, ArgsResult } from './src/Parser.js';
export { Command } from './src/classes/Command'; export { Command } from './src/classes/Command.js';
export { CommandOption } from './src/classes/CommandOption'; export { CommandOption } from './src/classes/CommandOption.js';
export { SubcommandGroupOption } from './src/classes/SubcommandGroupOption'; export { SubcommandGroupOption } from './src/classes/SubcommandGroupOption.js';
export { SubcommandOption } from './src/classes/SubcommandOption'; export { SubcommandOption } from './src/classes/SubcommandOption.js';
export { IResolver } from './src/interfaces/Resolver'; export { IResolver } from './src/interfaces/Resolver.js';
export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption'; export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption.js';
export { CommandDefinition } from './src/interfaces/Command'; export { CommandDefinition } from './src/interfaces/Command.js';

View File

@ -1,6 +1,6 @@
{ {
"name": "commandparser", "name": "@navy.gif/commandparser",
"version": "1.4.0", "version": "1.4.3",
"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,6 +10,9 @@
"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",

View File

@ -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'; import Command from './classes/Command.js';
import CommandOption from './classes/CommandOption'; import CommandOption from './classes/CommandOption.js';
import { OptionType } from "./interfaces/CommandOption"; import { OptionType } from "./interfaces/CommandOption.js";
import IResolver from './interfaces/Resolver'; import IResolver from './interfaces/Resolver.js';
import ExtendedMap from "./util/Map"; import ExtendedMap from "./util/Map.js";
import Util from "./util/Util"; import Util from "./util/Util.js";
type ArgsResult = { type ArgsResult = {
[key: string]: CommandOption [key: string]: CommandOption

View File

@ -1,9 +1,9 @@
import { OptionType } from "../interfaces/CommandOption"; import { OptionType } from "../interfaces/CommandOption.js";
import { ICommand, CommandDefinition } from "../interfaces/Command"; import { ICommand, CommandDefinition } from "../interfaces/Command.js";
import SubcommandOption from "./SubcommandOption"; import SubcommandOption from "./SubcommandOption.js";
import SubcommandGroupOption from "./SubcommandGroupOption"; import SubcommandGroupOption from "./SubcommandGroupOption.js";
import CommandOption from "./CommandOption"; import CommandOption from "./CommandOption.js";
import { ArgsResult } from "../Parser"; import { ArgsResult } from "../Parser.js";
abstract class Command implements ICommand { abstract class Command implements ICommand {

View File

@ -1,6 +1,6 @@
/* eslint-disable no-undefined */ /* eslint-disable no-undefined */
import ICommandOption, { Choice, CommandOptionDefinition, DependsOnMode, OptionType, ParseResult } from "../interfaces/CommandOption"; import ICommandOption, { Choice, CommandOptionDefinition, DependsOnMode, OptionType, ParseResult } from "../interfaces/CommandOption.js";
import IResolver from "../interfaces/Resolver"; import IResolver from "../interfaces/Resolver.js";
class CommandOption implements ICommandOption { class CommandOption implements ICommandOption {

View File

@ -1,5 +1,5 @@
import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption"; import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption.js";
import CommandOption from "./CommandOption"; import CommandOption from "./CommandOption.js";
class SubcommandGroupOption extends CommandOption { class SubcommandGroupOption extends CommandOption {
constructor (def: CommandOptionDefinition) { constructor (def: CommandOptionDefinition) {

View File

@ -1,5 +1,5 @@
import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption"; import { CommandOptionDefinition, OptionType } from "../interfaces/CommandOption.js";
import CommandOption from "./CommandOption"; import CommandOption from "./CommandOption.js";
class SubcommandOption extends CommandOption { class SubcommandOption extends CommandOption {
constructor (def: CommandOptionDefinition) { constructor (def: CommandOptionDefinition) {

View File

@ -1,8 +1,8 @@
import CommandOption from '../classes/CommandOption'; import CommandOption from '../classes/CommandOption.js';
import SubcommandGroupOption from '../classes/SubcommandGroupOption'; import SubcommandGroupOption from '../classes/SubcommandGroupOption.js';
import SubcommandOption from '../classes/SubcommandOption'; import SubcommandOption from '../classes/SubcommandOption.js';
import { ArgsResult } from '../Parser'; import { ArgsResult } from '../Parser.js';
import { CommandOptionDefinition } from './CommandOption'; import { CommandOptionDefinition } from './CommandOption.js';
interface ICommand { interface ICommand {

View File

@ -28,8 +28,8 @@
// | 'FLOAT' // | 'FLOAT'
// | 'POINTS' // | 'POINTS'
import CommandOption from "../classes/CommandOption"; import CommandOption from "../classes/CommandOption.js";
import IResolver from "./Resolver"; import IResolver from "./Resolver.js";
enum OptionType { enum OptionType {
SUB_COMMAND, SUB_COMMAND,

View File

@ -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": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ "moduleResolution": "nodenext", /* 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. */