@h3ravel/musket 0.3.11 → 0.4.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +10 -9
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -116,8 +116,8 @@ interface InitConfig {
116
116
  }
117
117
  //#endregion
118
118
  //#region src/Core/Kernel.d.ts
119
- declare class Kernel {
120
- app: Application;
119
+ declare class Kernel<A extends Application = Application> {
120
+ app: A;
121
121
  cwd: string;
122
122
  output: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
123
123
  modules: XGeneric<{
@@ -127,18 +127,18 @@ declare class Kernel {
127
127
  basePath: string;
128
128
  packages: NonNullable<InitConfig['packages']>;
129
129
  config: InitConfig;
130
- constructor(app: Application);
130
+ constructor(app: A);
131
131
  ensureDirectoryExists(dir: string): Promise<void>;
132
- static init(app: Application, config?: InitConfig): Promise<commander0.Command>;
132
+ static init<A extends Application>(app: A, config?: InitConfig): Promise<commander0.Command>;
133
133
  private run;
134
134
  private loadRequirements;
135
135
  }
136
136
  //#endregion
137
137
  //#region src/Core/Command.d.ts
138
- declare class Command {
139
- protected app: Application;
140
- protected kernel: Kernel;
141
- constructor(app: Application, kernel: Kernel);
138
+ declare class Command<A extends Application = Application> {
139
+ protected app: A;
140
+ protected kernel: Kernel<A>;
141
+ constructor(app: A, kernel: Kernel<A>);
142
142
  /**
143
143
  * The underlying commander instance.
144
144
  *
@@ -173,7 +173,7 @@ declare class Command {
173
173
  * Execute the console command.
174
174
  */
175
175
  handle(..._args: any[]): Promise<void>;
176
- setApplication(app: Application): void;
176
+ setApplication(app: A): void;
177
177
  setInput(options: XGeneric, args: string[], regArgs: readonly Argument[], dictionary: Record<string, any>, program: Command$1): this;
178
178
  setOption(key: string, value: unknown): this;
179
179
  setProgram(program: Command$1): this;
@@ -366,6 +366,7 @@ declare class Musket {
366
366
  //#endregion
367
367
  //#region src/Contracts/Application.d.ts
368
368
  declare class Application {
369
+ [key: string]: any;
369
370
  /**
370
371
  * The current musket CLI Instance
371
372
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/musket",
3
- "version": "0.3.11",
3
+ "version": "0.4.0",
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",