@h3ravel/musket 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -2
- package/dist/index.d.ts +12 -1
- package/dist/index.js +17 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -601,12 +601,12 @@ var Musket = class Musket {
|
|
|
601
601
|
this.tsDownConfig = tsDownConfig;
|
|
602
602
|
}
|
|
603
603
|
async build() {
|
|
604
|
-
this.loadBaseCommands();
|
|
605
|
-
await this.loadDiscoveredCommands();
|
|
604
|
+
await this.loadBaseCommands().loadDiscoveredCommands();
|
|
606
605
|
return await this.initialize();
|
|
607
606
|
}
|
|
608
607
|
loadBaseCommands() {
|
|
609
608
|
this.baseCommands.concat([new HelpCommand(this.app, this.kernel), new ListCommand(this.app, this.kernel)]).forEach((e) => this.addCommand(e));
|
|
609
|
+
return this;
|
|
610
610
|
}
|
|
611
611
|
/**
|
|
612
612
|
* Provide the configuration to initialize the CLI with
|
|
@@ -647,8 +647,23 @@ var Musket = class Musket {
|
|
|
647
647
|
}
|
|
648
648
|
commands.forEach((e) => this.addCommand(e));
|
|
649
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* Push a new command into the commands stack
|
|
652
|
+
*
|
|
653
|
+
* @param command
|
|
654
|
+
*/
|
|
650
655
|
addCommand(command) {
|
|
651
656
|
this.commands.push(Signature.parseSignature(command.getSignature(), command));
|
|
657
|
+
return this;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Push a list of new commands to commands stack
|
|
661
|
+
*
|
|
662
|
+
* @param command
|
|
663
|
+
*/
|
|
664
|
+
resolveCommands(commands) {
|
|
665
|
+
commands.forEach((e) => this.addCommand(e));
|
|
666
|
+
return this;
|
|
652
667
|
}
|
|
653
668
|
async initialize() {
|
|
654
669
|
if (process.argv.includes("--help") || process.argv.includes("-h")) await this.rebuild("help");
|
package/dist/index.d.ts
CHANGED
|
@@ -405,7 +405,18 @@ declare class Musket {
|
|
|
405
405
|
*/
|
|
406
406
|
discoverCommandsFrom(paths: string | string[]): this;
|
|
407
407
|
private loadDiscoveredCommands;
|
|
408
|
-
|
|
408
|
+
/**
|
|
409
|
+
* Push a new command into the commands stack
|
|
410
|
+
*
|
|
411
|
+
* @param command
|
|
412
|
+
*/
|
|
413
|
+
addCommand(command: Command): this;
|
|
414
|
+
/**
|
|
415
|
+
* Push a list of new commands to commands stack
|
|
416
|
+
*
|
|
417
|
+
* @param command
|
|
418
|
+
*/
|
|
419
|
+
resolveCommands(commands: Command[]): this;
|
|
409
420
|
private initialize;
|
|
410
421
|
rebuild(name: string): Promise<void>;
|
|
411
422
|
private makeOption;
|
package/dist/index.js
CHANGED
|
@@ -577,12 +577,12 @@ var Musket = class Musket {
|
|
|
577
577
|
this.tsDownConfig = tsDownConfig;
|
|
578
578
|
}
|
|
579
579
|
async build() {
|
|
580
|
-
this.loadBaseCommands();
|
|
581
|
-
await this.loadDiscoveredCommands();
|
|
580
|
+
await this.loadBaseCommands().loadDiscoveredCommands();
|
|
582
581
|
return await this.initialize();
|
|
583
582
|
}
|
|
584
583
|
loadBaseCommands() {
|
|
585
584
|
this.baseCommands.concat([new HelpCommand(this.app, this.kernel), new ListCommand(this.app, this.kernel)]).forEach((e) => this.addCommand(e));
|
|
585
|
+
return this;
|
|
586
586
|
}
|
|
587
587
|
/**
|
|
588
588
|
* Provide the configuration to initialize the CLI with
|
|
@@ -623,8 +623,23 @@ var Musket = class Musket {
|
|
|
623
623
|
}
|
|
624
624
|
commands.forEach((e) => this.addCommand(e));
|
|
625
625
|
}
|
|
626
|
+
/**
|
|
627
|
+
* Push a new command into the commands stack
|
|
628
|
+
*
|
|
629
|
+
* @param command
|
|
630
|
+
*/
|
|
626
631
|
addCommand(command) {
|
|
627
632
|
this.commands.push(Signature.parseSignature(command.getSignature(), command));
|
|
633
|
+
return this;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Push a list of new commands to commands stack
|
|
637
|
+
*
|
|
638
|
+
* @param command
|
|
639
|
+
*/
|
|
640
|
+
resolveCommands(commands) {
|
|
641
|
+
commands.forEach((e) => this.addCommand(e));
|
|
642
|
+
return this;
|
|
628
643
|
}
|
|
629
644
|
async initialize() {
|
|
630
645
|
if (process.argv.includes("--help") || process.argv.includes("-h")) await this.rebuild("help");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/musket",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Musket CLI is a framework-agnostic CLI framework designed to allow you build artisan-like CLI apps and for use in the H3ravel framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|