@h3ravel/musket 0.6.6 → 0.6.8
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 +19 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.js +19 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -963,7 +963,7 @@ var Kernel = class Kernel {
|
|
|
963
963
|
* @param command
|
|
964
964
|
*/
|
|
965
965
|
registerCommands(commands) {
|
|
966
|
-
commands.forEach(this.commands.add);
|
|
966
|
+
commands.forEach((e) => this.commands.add(e));
|
|
967
967
|
return this;
|
|
968
968
|
}
|
|
969
969
|
/**
|
|
@@ -973,6 +973,24 @@ 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
|
+
registerDiscoveryPath(path$2) {
|
|
981
|
+
path$2 = Array.isArray(path$2) ? path$2 : [path$2];
|
|
982
|
+
const discoveryPaths = Array.isArray(this.config.discoveryPaths) ? this.config.discoveryPaths : this.config.discoveryPaths ? [this.config.discoveryPaths] : [];
|
|
983
|
+
path$2.forEach((e) => discoveryPaths.push(e));
|
|
984
|
+
this.config.discoveryPaths = discoveryPaths;
|
|
985
|
+
return this;
|
|
986
|
+
}
|
|
987
|
+
/**
|
|
988
|
+
* Get all the registered discovery paths
|
|
989
|
+
*/
|
|
990
|
+
getDiscoveryPaths() {
|
|
991
|
+
return Array.isArray(this.config.discoveryPaths) ? this.config.discoveryPaths : this.config.discoveryPaths ? [this.config.discoveryPaths] : [];
|
|
992
|
+
}
|
|
993
|
+
/**
|
|
976
994
|
* Prepares the CLI for execution
|
|
977
995
|
*/
|
|
978
996
|
bootstrap() {
|
package/dist/index.d.ts
CHANGED
|
@@ -202,6 +202,16 @@ declare class Kernel<A extends Application = Application> {
|
|
|
202
202
|
* Get all the pre-registered commands
|
|
203
203
|
*/
|
|
204
204
|
getRegisteredCommands(): typeof Command<A>[];
|
|
205
|
+
/**
|
|
206
|
+
* Add a path or more to the discovery paths
|
|
207
|
+
*
|
|
208
|
+
* @param path
|
|
209
|
+
*/
|
|
210
|
+
registerDiscoveryPath(path: string | string[]): this;
|
|
211
|
+
/**
|
|
212
|
+
* Get all the registered discovery paths
|
|
213
|
+
*/
|
|
214
|
+
getDiscoveryPaths(): string[];
|
|
205
215
|
/**
|
|
206
216
|
* Prepares the CLI for execution
|
|
207
217
|
*/
|
package/dist/index.js
CHANGED
|
@@ -939,7 +939,7 @@ var Kernel = class Kernel {
|
|
|
939
939
|
* @param command
|
|
940
940
|
*/
|
|
941
941
|
registerCommands(commands) {
|
|
942
|
-
commands.forEach(this.commands.add);
|
|
942
|
+
commands.forEach((e) => this.commands.add(e));
|
|
943
943
|
return this;
|
|
944
944
|
}
|
|
945
945
|
/**
|
|
@@ -949,6 +949,24 @@ 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
|
+
registerDiscoveryPath(path$1) {
|
|
957
|
+
path$1 = Array.isArray(path$1) ? path$1 : [path$1];
|
|
958
|
+
const discoveryPaths = Array.isArray(this.config.discoveryPaths) ? this.config.discoveryPaths : this.config.discoveryPaths ? [this.config.discoveryPaths] : [];
|
|
959
|
+
path$1.forEach((e) => discoveryPaths.push(e));
|
|
960
|
+
this.config.discoveryPaths = discoveryPaths;
|
|
961
|
+
return this;
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Get all the registered discovery paths
|
|
965
|
+
*/
|
|
966
|
+
getDiscoveryPaths() {
|
|
967
|
+
return Array.isArray(this.config.discoveryPaths) ? this.config.discoveryPaths : this.config.discoveryPaths ? [this.config.discoveryPaths] : [];
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
952
970
|
* Prepares the CLI for execution
|
|
953
971
|
*/
|
|
954
972
|
bootstrap() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/musket",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
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",
|