@h3ravel/musket 0.1.3 → 0.1.5

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 CHANGED
@@ -780,7 +780,7 @@ var Musket = class Musket {
780
780
  }
781
781
  static async parse(kernel, config = {}) {
782
782
  const commands = config.baseCommands?.map((e) => new e(kernel.app, kernel));
783
- const cli = new Musket(kernel.app, kernel, commands, config.resolver).configure(config);
783
+ const cli = new Musket(kernel.app, kernel, commands, config.resolver, config.tsDownConfig).configure(config);
784
784
  if (config.cliName) cli.cliName = config.cliName;
785
785
  const command = (await cli.build()).exitOverride((e) => {
786
786
  if (e.exitCode <= 0) return;
@@ -800,7 +800,7 @@ var Musket = class Musket {
800
800
  //#endregion
801
801
  //#region package.json
802
802
  var name = "@h3ravel/musket";
803
- var version = "0.1.3";
803
+ var version = "0.1.5";
804
804
  var 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.";
805
805
  var type = "module";
806
806
  var exports$1 = {
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as commander0 from "commander";
2
2
  import { Argument, Command as Command$1 } from "commander";
3
- import { XGeneric } from "@h3ravel/support";
4
3
  import { Options } from "tsdown";
4
+ import { XGeneric } from "@h3ravel/support";
5
5
 
6
6
  //#region src/Contracts/ICommand.d.ts
7
7
  type CommandOption = {
@@ -74,7 +74,11 @@ interface InitConfig {
74
74
  * @param met
75
75
  * @returns
76
76
  */
77
- resolver?: <X>(cmd: X, met: string) => Promise<X>;
77
+ resolver?: <X extends Command>(cmd: X, met: string) => Promise<X>;
78
+ /**
79
+ * If we need to programmatically run the tsdown build command, we will use this config.
80
+ */
81
+ tsDownConfig?: Options;
78
82
  /**
79
83
  * Packages that should show up up when the `-V` flag is passed
80
84
  */
@@ -247,7 +251,7 @@ declare class Musket {
247
251
  cliName: string;
248
252
  private config;
249
253
  private commands;
250
- constructor(app: Application, kernel: Kernel, baseCommands?: Command[], resolver?: (<X>(cmd: X, met: string) => Promise<X>) | undefined, tsDownConfig?: Options);
254
+ constructor(app: Application, kernel: Kernel, baseCommands?: Command[], resolver?: (<X extends Command>(cmd: X, met: string) => Promise<X>) | undefined, tsDownConfig?: Options);
251
255
  build(): Promise<Command$1>;
252
256
  private loadBaseCommands;
253
257
  /**
package/dist/index.d.ts CHANGED
@@ -74,7 +74,11 @@ interface InitConfig {
74
74
  * @param met
75
75
  * @returns
76
76
  */
77
- resolver?: <X>(cmd: X, met: string) => Promise<X>;
77
+ resolver?: <X extends Command>(cmd: X, met: string) => Promise<X>;
78
+ /**
79
+ * If we need to programmatically run the tsdown build command, we will use this config.
80
+ */
81
+ tsDownConfig?: Options;
78
82
  /**
79
83
  * Packages that should show up up when the `-V` flag is passed
80
84
  */
@@ -247,7 +251,7 @@ declare class Musket {
247
251
  cliName: string;
248
252
  private config;
249
253
  private commands;
250
- constructor(app: Application, kernel: Kernel, baseCommands?: Command[], resolver?: (<X>(cmd: X, met: string) => Promise<X>) | undefined, tsDownConfig?: Options);
254
+ constructor(app: Application, kernel: Kernel, baseCommands?: Command[], resolver?: (<X extends Command>(cmd: X, met: string) => Promise<X>) | undefined, tsDownConfig?: Options);
251
255
  build(): Promise<Command$1>;
252
256
  private loadBaseCommands;
253
257
  /**
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ var Musket = class Musket {
750
750
  }
751
751
  static async parse(kernel, config = {}) {
752
752
  const commands = config.baseCommands?.map((e) => new e(kernel.app, kernel));
753
- const cli = new Musket(kernel.app, kernel, commands, config.resolver).configure(config);
753
+ const cli = new Musket(kernel.app, kernel, commands, config.resolver, config.tsDownConfig).configure(config);
754
754
  if (config.cliName) cli.cliName = config.cliName;
755
755
  const command = (await cli.build()).exitOverride((e) => {
756
756
  if (e.exitCode <= 0) return;
@@ -770,7 +770,7 @@ var Musket = class Musket {
770
770
  //#endregion
771
771
  //#region package.json
772
772
  var name = "@h3ravel/musket";
773
- var version = "0.1.3";
773
+ var version = "0.1.5";
774
774
  var 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.";
775
775
  var type = "module";
776
776
  var exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/musket",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
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
  "exports": {