@h3ravel/musket 0.6.5 → 0.6.7

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
@@ -973,6 +973,17 @@ var Kernel = class Kernel {
973
973
  return Array.from(this.commands);
974
974
  }
975
975
  /**
976
+ * Add a path or more to the discovery paths
977
+ *
978
+ * @param path
979
+ */
980
+ registerDiscovereryPath(path$2) {
981
+ const discoveryPaths = Array.isArray(this.config.discoveryPaths) ? this.config.discoveryPaths : this.config.discoveryPaths ? [this.config.discoveryPaths] : [];
982
+ path$2.forEach((e) => discoveryPaths.push(e));
983
+ this.config.discoveryPaths = discoveryPaths;
984
+ return this;
985
+ }
986
+ /**
976
987
  * Prepares the CLI for execution
977
988
  */
978
989
  bootstrap() {
package/dist/index.d.ts CHANGED
@@ -153,7 +153,7 @@ declare class Kernel<A extends Application = Application> {
153
153
  /**
154
154
  * The CLI configuration options
155
155
  */
156
- private config;
156
+ config: KernelConfig;
157
157
  constructor(app: A);
158
158
  ensureDirectoryExists(dir: string): Promise<void>;
159
159
  /**
@@ -197,11 +197,17 @@ declare class Kernel<A extends Application = Application> {
197
197
  *
198
198
  * @param command
199
199
  */
200
- registerCommands(commands: typeof Command[]): this;
200
+ registerCommands(commands: typeof Command<A>[]): this;
201
201
  /**
202
202
  * Get all the pre-registered commands
203
203
  */
204
- getRegisteredCommands(): typeof Command[];
204
+ getRegisteredCommands(): typeof Command<A>[];
205
+ /**
206
+ * Add a path or more to the discovery paths
207
+ *
208
+ * @param path
209
+ */
210
+ registerDiscovereryPath(path: string[]): this;
205
211
  /**
206
212
  * Prepares the CLI for execution
207
213
  */
@@ -484,7 +490,7 @@ declare class Signature {
484
490
  * @param commandClass
485
491
  * @returns
486
492
  */
487
- static parseSignature<A extends Application = Application>(signature: string, commandClass: Command<A>): ParsedCommand;
493
+ static parseSignature<A extends Application = Application>(signature: string, commandClass: Command<A>): ParsedCommand<A>;
488
494
  }
489
495
  //#endregion
490
496
  export { Application, Command, CommandMethodResolver, CommandOption, Kernel, KernelConfig, Musket, PackageMeta, ParsedCommand, Signature };
package/dist/index.js CHANGED
@@ -949,6 +949,17 @@ var Kernel = class Kernel {
949
949
  return Array.from(this.commands);
950
950
  }
951
951
  /**
952
+ * Add a path or more to the discovery paths
953
+ *
954
+ * @param path
955
+ */
956
+ registerDiscovereryPath(path$1) {
957
+ const discoveryPaths = Array.isArray(this.config.discoveryPaths) ? this.config.discoveryPaths : this.config.discoveryPaths ? [this.config.discoveryPaths] : [];
958
+ path$1.forEach((e) => discoveryPaths.push(e));
959
+ this.config.discoveryPaths = discoveryPaths;
960
+ return this;
961
+ }
962
+ /**
952
963
  * Prepares the CLI for execution
953
964
  */
954
965
  bootstrap() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h3ravel/musket",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
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",