@bleed-believer/commander
Advanced tools
Comparing version 0.10.1 to 0.10.2
@@ -1,3 +0,3 @@ | ||
export { Argv } from './argv.js'; | ||
export { ArgvData } from './argv-data.js'; | ||
export { ParserOptions } from './parser-options.js'; | ||
export type { Argv } from './argv.js'; | ||
export type { ArgvData } from './argv-data.js'; | ||
export type { ParserOptions } from './parser-options.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { CommandRoutingDecorator, CommandRoutingOptions, CommandRoutingMeta } from './interfaces/index.js'; | ||
import type { CommandRoutingDecorator, CommandRoutingOptions, CommandRoutingMeta } from './interfaces/index.js'; | ||
export declare const COMMAND_ROUTING: MetaManager<CommandRoutingMeta>; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,8 +0,8 @@ | ||
export { BeforeCommand } from './before-command.js'; | ||
export { FailedCommand } from './failed-command.js'; | ||
export { AfterCommand } from './after-command.js'; | ||
export { CommandRoute } from './command-route.js'; | ||
export { CommandRoutingDecorator } from './command-routing.decorator.js'; | ||
export { CommandRoutingOptions } from './command-routing.options.js'; | ||
export { CommandRoutingClass } from './command-routing.class.js'; | ||
export { CommandRoutingMeta } from './command-routing.meta.js'; | ||
export type { BeforeCommand } from './before-command.js'; | ||
export type { FailedCommand } from './failed-command.js'; | ||
export type { AfterCommand } from './after-command.js'; | ||
export type { CommandRoute } from './command-route.js'; | ||
export type { CommandRoutingDecorator } from './command-routing.decorator.js'; | ||
export type { CommandRoutingOptions } from './command-routing.options.js'; | ||
export type { CommandRoutingClass } from './command-routing.class.js'; | ||
export type { CommandRoutingMeta } from './command-routing.meta.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { CommandDecorator, CommandMeta, CommandOptions } from './interfaces/index.js'; | ||
import type { CommandDecorator, CommandMeta, CommandOptions } from './interfaces/index.js'; | ||
export declare const COMMAND: MetaManager<CommandMeta>; | ||
@@ -4,0 +4,0 @@ /** |
@@ -6,3 +6,3 @@ "use strict"; | ||
const index_js_1 = require("./errors/index.js"); | ||
const argv_parser_js_1 = require("../argv-parser/argv-parser.js"); | ||
const index_js_2 = require("../argv-parser/index.js"); | ||
exports.COMMAND = new meta_1.MetaManager('@bleed-believer/commander:command'); | ||
@@ -15,3 +15,3 @@ /** | ||
return target => { | ||
const path = argv_parser_js_1.ArgvParser.parsePattern(options.path); | ||
const path = index_js_2.ArgvParser.parsePattern(options.path); | ||
const inva = path.some(x => !x.match(/^(\.{3}|(:[a-z])?[a-z0-9\-_]*[a-z0-9])$/gi)); | ||
@@ -18,0 +18,0 @@ if (inva) { |
@@ -1,5 +0,5 @@ | ||
export { CommandDecorator } from './command.decorator.js'; | ||
export { CommandOptions } from './command.options.js'; | ||
export { CommandClass } from './command.class.js'; | ||
export { CommandMeta } from './command.meta.js'; | ||
export { Executable } from './executable.js'; | ||
export type { CommandDecorator } from './command.decorator.js'; | ||
export type { CommandOptions } from './command.options.js'; | ||
export type { CommandClass } from './command.class.js'; | ||
export type { CommandMeta } from './command.meta.js'; | ||
export type { Executable } from './executable.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { ParserOptions } from '../argv-parser/index.js'; | ||
import { CommandRoutingClass } from '../command-routing/index.js'; | ||
import { CommanderMeta } from './commander.meta.js'; | ||
import type { CommandRoutingClass } from '../command-routing/index.js'; | ||
import type { ParserOptions } from '../argv-parser/index.js'; | ||
import type { CommanderMeta } from './commander.meta.js'; | ||
export declare const COMMANDER: MetaManager<CommanderMeta>; | ||
@@ -6,0 +6,0 @@ /** |
@@ -6,6 +6,6 @@ "use strict"; | ||
const index_js_1 = require("./errors/index.js"); | ||
const index_js_2 = require("../argv-parser/index.js"); | ||
const index_js_3 = require("../flatten-route/index.js"); | ||
const get_argv_data_js_1 = require("../get-argv-data/get-argv-data.js"); | ||
const get_argv_js_1 = require("../get-argv/get-argv.js"); | ||
const index_js_2 = require("../flatten-route/index.js"); | ||
const index_js_3 = require("../argv-parser/index.js"); | ||
const index_js_4 = require("../get-argv-data/index.js"); | ||
const index_js_5 = require("../get-argv/index.js"); | ||
exports.COMMANDER = new meta_1.MetaManager(); | ||
@@ -49,5 +49,5 @@ /** | ||
const meta = exports.COMMANDER.get(Commander); | ||
const argv = new index_js_2.ArgvParser(meta.rawArgv, this.#opts); | ||
const argv = new index_js_3.ArgvParser(meta.rawArgv, this.#opts); | ||
// Add Argv to the Commander Metadata | ||
get_argv_js_1.GET_ARGV.set(Commander, { | ||
index_js_5.GET_ARGV.set(Commander, { | ||
main: argv.main, | ||
@@ -57,7 +57,7 @@ flags: argv.flags, | ||
// Find a result | ||
const flattened = (0, index_js_3.flattenRoute)(this.#main); | ||
const flattened = (0, index_js_2.flattenRoute)(this.#main); | ||
const flat = flattened.find(x => { | ||
const data = argv.match(x.path); | ||
if (data) { | ||
get_argv_data_js_1.GET_ARGV_DATA.set(Commander, { | ||
index_js_4.GET_ARGV_DATA.set(Commander, { | ||
items: [...data.items], | ||
@@ -64,0 +64,0 @@ param: { ...data.param } |
@@ -0,3 +1,3 @@ | ||
import type { FlattenedCommand } from './interfaces/index.js'; | ||
import { CommandRoutingClass } from '../command-routing/index.js'; | ||
import { FlattenedCommand } from './interfaces/index.js'; | ||
export declare function flattenRoute(base: CommandRoutingClass): FlattenedCommand[]; |
@@ -1,1 +0,1 @@ | ||
export { FlattenedCommand } from './flattened-command.js'; | ||
export type { FlattenedCommand } from './flattened-command.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
import { ArgvData } from '../argv-parser/index.js'; | ||
import type { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
import type { ArgvData } from '../argv-parser/index.js'; | ||
export declare const GET_ARGV_DATA: MetaManager<ArgvData>; | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
export type { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
export * from './get-argv-data.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { GetArgvDecorator } from './get-argv.decorator.js'; | ||
import { Argv } from '../argv-parser/index.js'; | ||
import type { GetArgvDecorator } from './get-argv.decorator.js'; | ||
import type { Argv } from '../argv-parser/index.js'; | ||
export declare const GET_ARGV: MetaManager<Argv>; | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export { GetArgvDecorator } from './get-argv.decorator.js'; | ||
export type { GetArgvDecorator } from './get-argv.decorator.js'; | ||
export * from './get-argv.js'; |
export { Commander, CommandNotFoundError, DuplicatedInstanceError, InstanceNotExecutedError } from './commander/index.js'; | ||
export { Argv, ArgvData, ParserOptions } from './argv-parser/index.js'; | ||
export { Command, Executable, CommandOptions, CommandDecorator, InvalidPathError, } from './command/index.js'; | ||
export { AfterCommand, BeforeCommand, FailedCommand, CommandRoute, CommandRouting, CommandRoutingOptions, CommandRoutingDecorator, } from './command-routing/index.js'; | ||
export { GetArgv, GetArgvDecorator } from './get-argv/index.js'; | ||
export { getArgvData, GetArgvDataDecorator } from './get-argv-data/index.js'; | ||
export type { Argv, ArgvData, ParserOptions } from './argv-parser/index.js'; | ||
export { Command, InvalidPathError, } from './command/index.js'; | ||
export type { Executable, CommandOptions, CommandDecorator, } from './command/index.js'; | ||
export { CommandRouting, } from './command-routing/index.js'; | ||
export type { AfterCommand, BeforeCommand, FailedCommand, CommandRoute, CommandRoutingOptions, CommandRoutingDecorator, } from './command-routing/index.js'; | ||
export { GetArgv, } from './get-argv/index.js'; | ||
export type { GetArgvDecorator, } from './get-argv/index.js'; | ||
export { getArgvData, } from './get-argv-data/index.js'; | ||
export type { GetArgvDataDecorator, } from './get-argv-data/index.js'; |
@@ -1,1 +0,1 @@ | ||
export { TypedPropertyDecorator } from './typed-property-decorator.js'; | ||
export type { TypedPropertyDecorator } from './typed-property-decorator.js'; |
@@ -1,3 +0,3 @@ | ||
export { Argv } from './argv.js'; | ||
export { ArgvData } from './argv-data.js'; | ||
export { ParserOptions } from './parser-options.js'; | ||
export type { Argv } from './argv.js'; | ||
export type { ArgvData } from './argv-data.js'; | ||
export type { ParserOptions } from './parser-options.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { CommandRoutingDecorator, CommandRoutingOptions, CommandRoutingMeta } from './interfaces/index.js'; | ||
import type { CommandRoutingDecorator, CommandRoutingOptions, CommandRoutingMeta } from './interfaces/index.js'; | ||
export declare const COMMAND_ROUTING: MetaManager<CommandRoutingMeta>; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,8 +0,8 @@ | ||
export { BeforeCommand } from './before-command.js'; | ||
export { FailedCommand } from './failed-command.js'; | ||
export { AfterCommand } from './after-command.js'; | ||
export { CommandRoute } from './command-route.js'; | ||
export { CommandRoutingDecorator } from './command-routing.decorator.js'; | ||
export { CommandRoutingOptions } from './command-routing.options.js'; | ||
export { CommandRoutingClass } from './command-routing.class.js'; | ||
export { CommandRoutingMeta } from './command-routing.meta.js'; | ||
export type { BeforeCommand } from './before-command.js'; | ||
export type { FailedCommand } from './failed-command.js'; | ||
export type { AfterCommand } from './after-command.js'; | ||
export type { CommandRoute } from './command-route.js'; | ||
export type { CommandRoutingDecorator } from './command-routing.decorator.js'; | ||
export type { CommandRoutingOptions } from './command-routing.options.js'; | ||
export type { CommandRoutingClass } from './command-routing.class.js'; | ||
export type { CommandRoutingMeta } from './command-routing.meta.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { CommandDecorator, CommandMeta, CommandOptions } from './interfaces/index.js'; | ||
import type { CommandDecorator, CommandMeta, CommandOptions } from './interfaces/index.js'; | ||
export declare const COMMAND: MetaManager<CommandMeta>; | ||
@@ -4,0 +4,0 @@ /** |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { InvalidPathError } from './errors/index.js'; | ||
import { ArgvParser } from '../argv-parser/argv-parser.js'; | ||
import { ArgvParser } from '../argv-parser/index.js'; | ||
export const COMMAND = new MetaManager('@bleed-believer/commander:command'); | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
export { CommandDecorator } from './command.decorator.js'; | ||
export { CommandOptions } from './command.options.js'; | ||
export { CommandClass } from './command.class.js'; | ||
export { CommandMeta } from './command.meta.js'; | ||
export { Executable } from './executable.js'; | ||
export type { CommandDecorator } from './command.decorator.js'; | ||
export type { CommandOptions } from './command.options.js'; | ||
export type { CommandClass } from './command.class.js'; | ||
export type { CommandMeta } from './command.meta.js'; | ||
export type { Executable } from './executable.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { ParserOptions } from '../argv-parser/index.js'; | ||
import { CommandRoutingClass } from '../command-routing/index.js'; | ||
import { CommanderMeta } from './commander.meta.js'; | ||
import type { CommandRoutingClass } from '../command-routing/index.js'; | ||
import type { ParserOptions } from '../argv-parser/index.js'; | ||
import type { CommanderMeta } from './commander.meta.js'; | ||
export declare const COMMANDER: MetaManager<CommanderMeta>; | ||
@@ -6,0 +6,0 @@ /** |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { CommandNotFoundError, DuplicatedInstanceError } from './errors/index.js'; | ||
import { flattenRoute } from '../flatten-route/index.js'; | ||
import { ArgvParser } from '../argv-parser/index.js'; | ||
import { flattenRoute } from '../flatten-route/index.js'; | ||
import { GET_ARGV_DATA } from '../get-argv-data/get-argv-data.js'; | ||
import { GET_ARGV } from '../get-argv/get-argv.js'; | ||
import { GET_ARGV_DATA } from '../get-argv-data/index.js'; | ||
import { GET_ARGV } from '../get-argv/index.js'; | ||
export const COMMANDER = new MetaManager(); | ||
@@ -8,0 +8,0 @@ /** |
@@ -0,3 +1,3 @@ | ||
import type { FlattenedCommand } from './interfaces/index.js'; | ||
import { CommandRoutingClass } from '../command-routing/index.js'; | ||
import { FlattenedCommand } from './interfaces/index.js'; | ||
export declare function flattenRoute(base: CommandRoutingClass): FlattenedCommand[]; |
@@ -1,1 +0,1 @@ | ||
export { FlattenedCommand } from './flattened-command.js'; | ||
export type { FlattenedCommand } from './flattened-command.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
import { ArgvData } from '../argv-parser/index.js'; | ||
import type { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
import type { ArgvData } from '../argv-parser/index.js'; | ||
export declare const GET_ARGV_DATA: MetaManager<ArgvData>; | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
export type { GetArgvDataDecorator } from './get-argv-data.decorator.js'; | ||
export * from './get-argv-data.js'; |
import { MetaManager } from '@bleed-believer/meta'; | ||
import { GetArgvDecorator } from './get-argv.decorator.js'; | ||
import { Argv } from '../argv-parser/index.js'; | ||
import type { GetArgvDecorator } from './get-argv.decorator.js'; | ||
import type { Argv } from '../argv-parser/index.js'; | ||
export declare const GET_ARGV: MetaManager<Argv>; | ||
@@ -5,0 +5,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export { GetArgvDecorator } from './get-argv.decorator.js'; | ||
export type { GetArgvDecorator } from './get-argv.decorator.js'; | ||
export * from './get-argv.js'; |
export { Commander, CommandNotFoundError, DuplicatedInstanceError, InstanceNotExecutedError } from './commander/index.js'; | ||
export { Argv, ArgvData, ParserOptions } from './argv-parser/index.js'; | ||
export { Command, Executable, CommandOptions, CommandDecorator, InvalidPathError, } from './command/index.js'; | ||
export { AfterCommand, BeforeCommand, FailedCommand, CommandRoute, CommandRouting, CommandRoutingOptions, CommandRoutingDecorator, } from './command-routing/index.js'; | ||
export { GetArgv, GetArgvDecorator } from './get-argv/index.js'; | ||
export { getArgvData, GetArgvDataDecorator } from './get-argv-data/index.js'; | ||
export type { Argv, ArgvData, ParserOptions } from './argv-parser/index.js'; | ||
export { Command, InvalidPathError, } from './command/index.js'; | ||
export type { Executable, CommandOptions, CommandDecorator, } from './command/index.js'; | ||
export { CommandRouting, } from './command-routing/index.js'; | ||
export type { AfterCommand, BeforeCommand, FailedCommand, CommandRoute, CommandRoutingOptions, CommandRoutingDecorator, } from './command-routing/index.js'; | ||
export { GetArgv, } from './get-argv/index.js'; | ||
export type { GetArgvDecorator, } from './get-argv/index.js'; | ||
export { getArgvData, } from './get-argv-data/index.js'; | ||
export type { GetArgvDataDecorator, } from './get-argv-data/index.js'; |
export { Commander, CommandNotFoundError, DuplicatedInstanceError, InstanceNotExecutedError } from './commander/index.js'; | ||
export { Command, InvalidPathError, } from './command/index.js'; | ||
export { CommandRouting, } from './command-routing/index.js'; | ||
export { GetArgv } from './get-argv/index.js'; | ||
export { getArgvData } from './get-argv-data/index.js'; | ||
export { GetArgv, } from './get-argv/index.js'; | ||
export { getArgvData, } from './get-argv-data/index.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
export { TypedPropertyDecorator } from './typed-property-decorator.js'; | ||
export type { TypedPropertyDecorator } from './typed-property-decorator.js'; |
{ | ||
"name": "@bleed-believer/commander", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"description": "Create CLI with routing using classes and decorators.", | ||
@@ -41,5 +41,5 @@ "type": "module", | ||
"dependencies": { | ||
"@bleed-believer/meta": "^0.10.0" | ||
"@bleed-believer/meta": "^0.10.1" | ||
}, | ||
"gitHead": "8b8588d85df3273fb6b3bd8d1820aec83397fac8" | ||
"gitHead": "80ce81a351bf4a41bfdd633843b956c9581e9f0f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98030
1510
Updated@bleed-believer/meta@^0.10.1