@h3ravel/musket 0.3.6 → 0.3.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 +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -638,7 +638,7 @@ var Musket = class Musket {
|
|
|
638
638
|
* CLI Commands auto registration
|
|
639
639
|
*/
|
|
640
640
|
for await (const pth of glob.glob.stream(paths)) {
|
|
641
|
-
const name = node_path.default.basename(pth).
|
|
641
|
+
const name = node_path.default.basename(pth).replaceAll(/\.ts|\.js|\.mjs/g, "");
|
|
642
642
|
try {
|
|
643
643
|
const cmdClass = (await import(pth))[name];
|
|
644
644
|
commands.push(new cmdClass(this.app, this.kernel));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as commander0 from "commander";
|
|
2
2
|
import { Argument, Command as Command$1 } from "commander";
|
|
3
3
|
import { ChoiceOrSeparatorArray, Choices } from "@h3ravel/shared";
|
|
4
|
-
import {
|
|
4
|
+
import { UserConfig } from "tsdown";
|
|
5
5
|
import { XGeneric } from "@h3ravel/support";
|
|
6
6
|
|
|
7
7
|
//#region src/Contracts/ICommand.d.ts
|
|
@@ -79,7 +79,7 @@ interface InitConfig {
|
|
|
79
79
|
/**
|
|
80
80
|
* If we need to programmatically run the tsdown build command, we will use this config.
|
|
81
81
|
*/
|
|
82
|
-
tsDownConfig?:
|
|
82
|
+
tsDownConfig?: UserConfig;
|
|
83
83
|
/**
|
|
84
84
|
* Packages that should show up up when the `-V` flag is passed
|
|
85
85
|
*/
|
|
@@ -182,7 +182,7 @@ declare class Command {
|
|
|
182
182
|
option(key: string, def?: any): any;
|
|
183
183
|
options(key?: string): any;
|
|
184
184
|
argument(key: string, def?: any): any;
|
|
185
|
-
arguments(): any
|
|
185
|
+
arguments(): Record<string, any>;
|
|
186
186
|
loadBaseFlags(): void;
|
|
187
187
|
/**
|
|
188
188
|
* Check if the command is quiet
|
|
@@ -255,7 +255,7 @@ declare class Command {
|
|
|
255
255
|
/**
|
|
256
256
|
* The default value
|
|
257
257
|
*/
|
|
258
|
-
def?: string | undefined):
|
|
258
|
+
def?: string | undefined): Promise<string>;
|
|
259
259
|
/**
|
|
260
260
|
* Allows users to pick from a predefined set of choices when asked a question.
|
|
261
261
|
*/
|
|
@@ -271,7 +271,7 @@ declare class Command {
|
|
|
271
271
|
/**
|
|
272
272
|
* Item index front of which the cursor will initially appear
|
|
273
273
|
*/
|
|
274
|
-
defaultIndex?: number):
|
|
274
|
+
defaultIndex?: number): Promise<string>;
|
|
275
275
|
/**
|
|
276
276
|
* Ask the user for a simple "yes or no" confirmation. By default, this method returns `false`.
|
|
277
277
|
* However, if the user enters y or yes in response to the prompt, the method would return `true`.
|
|
@@ -284,7 +284,7 @@ declare class Command {
|
|
|
284
284
|
/**
|
|
285
285
|
* The default value
|
|
286
286
|
*/
|
|
287
|
-
def?: boolean | undefined):
|
|
287
|
+
def?: boolean | undefined): Promise<boolean>;
|
|
288
288
|
/**
|
|
289
289
|
* Prompt the user with the given question, accept their input which will
|
|
290
290
|
* not be visible to them as they type in the console, and then return the user's input back to your command.
|
|
@@ -299,7 +299,7 @@ declare class Command {
|
|
|
299
299
|
*
|
|
300
300
|
* @default true
|
|
301
301
|
*/
|
|
302
|
-
mask?: string | boolean):
|
|
302
|
+
mask?: string | boolean): Promise<string>;
|
|
303
303
|
/**
|
|
304
304
|
* Provide auto-completion for possible choices. The user can still provide any
|
|
305
305
|
* answer, regardless of the auto-completion hints.
|
|
@@ -316,7 +316,7 @@ declare class Command {
|
|
|
316
316
|
/**
|
|
317
317
|
* Set a default value
|
|
318
318
|
*/
|
|
319
|
-
def?: string): any
|
|
319
|
+
def?: string): Promise<any>;
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/Musket.d.ts
|
|
@@ -334,7 +334,7 @@ declare class Musket {
|
|
|
334
334
|
cliName: string;
|
|
335
335
|
private config;
|
|
336
336
|
private commands;
|
|
337
|
-
constructor(app: Application, kernel: Kernel, baseCommands?: Command[], resolver?: NonNullable<InitConfig["resolver"]> | undefined, tsDownConfig?:
|
|
337
|
+
constructor(app: Application, kernel: Kernel, baseCommands?: Command[], resolver?: NonNullable<InitConfig["resolver"]> | undefined, tsDownConfig?: UserConfig);
|
|
338
338
|
build(): Promise<Command$1>;
|
|
339
339
|
private loadBaseCommands;
|
|
340
340
|
/**
|
package/dist/index.js
CHANGED
|
@@ -614,7 +614,7 @@ var Musket = class Musket {
|
|
|
614
614
|
* CLI Commands auto registration
|
|
615
615
|
*/
|
|
616
616
|
for await (const pth of glob.stream(paths)) {
|
|
617
|
-
const name = path.basename(pth).
|
|
617
|
+
const name = path.basename(pth).replaceAll(/\.ts|\.js|\.mjs/g, "");
|
|
618
618
|
try {
|
|
619
619
|
const cmdClass = (await import(pth))[name];
|
|
620
620
|
commands.push(new cmdClass(this.app, this.kernel));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h3ravel/musket",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"console"
|
|
51
51
|
],
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@h3ravel/support": "^0.15.
|
|
53
|
+
"@h3ravel/support": "^0.15.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/node": "^24.7.2",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"vitest": "^3.2.4"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@h3ravel/shared": "^0.27.
|
|
69
|
+
"@h3ravel/shared": "^0.27.4",
|
|
70
70
|
"chalk": "^5.6.2",
|
|
71
71
|
"commander": "^14.0.1",
|
|
72
72
|
"dayjs": "^1.11.18",
|