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 { CommandOption } from './src/classes/CommandOption';
export { SubcommandGroupOption } from './src/classes/SubcommandGroupOption';
export { SubcommandOption } from './src/classes/SubcommandOption';
export { Command } from './src/classes/Command.js';
export { CommandOption } from './src/classes/CommandOption.js';
export { SubcommandGroupOption } from './src/classes/SubcommandGroupOption.js';
export { SubcommandOption } from './src/classes/SubcommandOption.js';
export { IResolver } from './src/interfaces/Resolver';
export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption';
export { CommandDefinition } from './src/interfaces/Command';
export { IResolver } from './src/interfaces/Resolver.js';
export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption.js';
export { CommandDefinition } from './src/interfaces/Command.js';

View File

@ -1,6 +1,6 @@
{
"name": "commandparser",
"version": "1.4.0",
"name": "@navy.gif/commandparser",
"version": "1.4.3",
"description": "Parser meant to parse commands and their options for discord bots",
"author": "Navy.gif",
"license": "MIT",
@ -10,6 +10,9 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "./build/esm/index.d.ts",
"files": [
"build/**/*"
],
"exports": {
".": {
"import": "./build/esm/index.js",

View File

@ -1,12 +1,12 @@
// eslint-disable-next-line max-classes-per-file
import { EventEmitter } from 'events';
import Command from './classes/Command';
import CommandOption from './classes/CommandOption';
import Command from './classes/Command.js';
import CommandOption from './classes/CommandOption.js';
import { OptionType } from "./interfaces/CommandOption";
import IResolver from './interfaces/Resolver';
import ExtendedMap from "./util/Map";
import Util from "./util/Util";
import { OptionType } from "./interfaces/CommandOption.js";
import IResolver from './interfaces/Resolver.js';
import ExtendedMap from "./util/Map.js";
import Util from "./util/Util.js";
type ArgsResult = {
[key: string]: CommandOption

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -27,7 +27,7 @@
/* Modules */
"module": "ES2022", /* Specify what module code is generated. */
// "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. */
// "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. */