@moostjs/event-cli 0.5.22 → 0.5.24
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 +20 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.mjs +10 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -263,11 +263,17 @@ var CliApp = class extends moost.Moost {
|
|
|
263
263
|
* @returns {any} The result of the initialization process.
|
|
264
264
|
*/ start() {
|
|
265
265
|
const cli = new MoostCli({
|
|
266
|
-
wooksCli: { cliHelp: this._helpOpts
|
|
266
|
+
wooksCli: { cliHelp: this._helpOpts ? {
|
|
267
|
+
name: this._helpOpts.name,
|
|
268
|
+
title: this._helpOpts.title,
|
|
269
|
+
maxWidth: this._helpOpts.maxWidth,
|
|
270
|
+
maxLeft: this._helpOpts.maxLeft,
|
|
271
|
+
mark: this._helpOpts.mark
|
|
272
|
+
} : undefined },
|
|
267
273
|
globalCliOptions: this._globalOpts
|
|
268
274
|
});
|
|
269
275
|
this.adapter(cli);
|
|
270
|
-
if (this._helpOpts) this.applyGlobalInterceptors(
|
|
276
|
+
if (this._helpOpts) this.applyGlobalInterceptors(cliHelpInterceptor({
|
|
271
277
|
colors: this._helpOpts.colors,
|
|
272
278
|
lookupLevel: this._helpOpts.lookupLevel
|
|
273
279
|
}));
|
|
@@ -292,6 +298,12 @@ Object.defineProperty(exports, 'Controller', {
|
|
|
292
298
|
return moost.Controller;
|
|
293
299
|
}
|
|
294
300
|
});
|
|
301
|
+
Object.defineProperty(exports, 'Description', {
|
|
302
|
+
enumerable: true,
|
|
303
|
+
get: function () {
|
|
304
|
+
return moost.Description;
|
|
305
|
+
}
|
|
306
|
+
});
|
|
295
307
|
Object.defineProperty(exports, 'Intercept', {
|
|
296
308
|
enumerable: true,
|
|
297
309
|
get: function () {
|
|
@@ -299,6 +311,12 @@ Object.defineProperty(exports, 'Intercept', {
|
|
|
299
311
|
}
|
|
300
312
|
});
|
|
301
313
|
exports.MoostCli = MoostCli
|
|
314
|
+
Object.defineProperty(exports, 'Optional', {
|
|
315
|
+
enumerable: true,
|
|
316
|
+
get: function () {
|
|
317
|
+
return moost.Optional;
|
|
318
|
+
}
|
|
319
|
+
});
|
|
302
320
|
Object.defineProperty(exports, 'Param', {
|
|
303
321
|
enumerable: true,
|
|
304
322
|
get: function () {
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { WooksCli, TWooksCliOptions } from '@wooksjs/event-cli';
|
|
|
2
2
|
export { useCliContext } from '@wooksjs/event-cli';
|
|
3
3
|
import * as moost from 'moost';
|
|
4
4
|
import { TMoostAdapter, Moost, TMoostAdapterOptions } from 'moost';
|
|
5
|
-
export { Controller, Intercept, Param, TInterceptorPriority, defineInterceptorFn } from 'moost';
|
|
5
|
+
export { Controller, Description, Intercept, Optional, Param, TInterceptorPriority, defineInterceptorFn } from 'moost';
|
|
6
6
|
|
|
7
7
|
declare function Cli(path?: string): MethodDecorator;
|
|
8
8
|
declare function CliAlias(alias: string): MethodDecorator;
|
|
@@ -52,7 +52,12 @@ declare const CliHelpInterceptor: (opts?: {
|
|
|
52
52
|
lookupLevel?: number | undefined;
|
|
53
53
|
} | undefined) => ClassDecorator & MethodDecorator;
|
|
54
54
|
|
|
55
|
-
type THelpOptions =
|
|
55
|
+
type THelpOptions = {
|
|
56
|
+
name?: string;
|
|
57
|
+
title?: string;
|
|
58
|
+
maxWidth?: number;
|
|
59
|
+
maxLeft?: number;
|
|
60
|
+
mark?: string;
|
|
56
61
|
colors?: boolean;
|
|
57
62
|
lookupLevel?: number;
|
|
58
63
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Controller, Intercept, Moost, Param, Resolve, TInterceptorPriority, defineInterceptorFn, defineMoostEventHandler, getMoostMate, setInfactLoggingOptions, useControllerContext } from "moost";
|
|
1
|
+
import { Controller, Description, Intercept, Moost, Optional, Param, Resolve, TInterceptorPriority, defineInterceptorFn, defineMoostEventHandler, getMoostMate, setInfactLoggingOptions, useControllerContext } from "moost";
|
|
2
2
|
import { WooksCli, createCliApp, useAutoHelp, useCliContext, useCliOption, useCommandLookupHelp } from "@wooksjs/event-cli";
|
|
3
3
|
|
|
4
4
|
//#region packages/event-cli/src/meta-types.ts
|
|
@@ -239,11 +239,17 @@ var CliApp = class extends Moost {
|
|
|
239
239
|
* @returns {any} The result of the initialization process.
|
|
240
240
|
*/ start() {
|
|
241
241
|
const cli = new MoostCli({
|
|
242
|
-
wooksCli: { cliHelp: this._helpOpts
|
|
242
|
+
wooksCli: { cliHelp: this._helpOpts ? {
|
|
243
|
+
name: this._helpOpts.name,
|
|
244
|
+
title: this._helpOpts.title,
|
|
245
|
+
maxWidth: this._helpOpts.maxWidth,
|
|
246
|
+
maxLeft: this._helpOpts.maxLeft,
|
|
247
|
+
mark: this._helpOpts.mark
|
|
248
|
+
} : undefined },
|
|
243
249
|
globalCliOptions: this._globalOpts
|
|
244
250
|
});
|
|
245
251
|
this.adapter(cli);
|
|
246
|
-
if (this._helpOpts) this.applyGlobalInterceptors(
|
|
252
|
+
if (this._helpOpts) this.applyGlobalInterceptors(cliHelpInterceptor({
|
|
247
253
|
colors: this._helpOpts.colors,
|
|
248
254
|
lookupLevel: this._helpOpts.lookupLevel
|
|
249
255
|
}));
|
|
@@ -255,4 +261,4 @@ var CliApp = class extends Moost {
|
|
|
255
261
|
};
|
|
256
262
|
|
|
257
263
|
//#endregion
|
|
258
|
-
export { Cli, CliAlias, CliApp, CliExample, CliGlobalOption, CliHelpInterceptor, CliOption, Controller, Intercept, MoostCli, Param, cliHelpInterceptor, useCliContext };
|
|
264
|
+
export { Cli, CliAlias, CliApp, CliExample, CliGlobalOption, CliHelpInterceptor, CliOption, Controller, Description, Intercept, MoostCli, Optional, Param, cliHelpInterceptor, useCliContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moostjs/event-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.24",
|
|
4
4
|
"description": "@moostjs/event-cli",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@wooksjs/event-cli": "^0.5.25",
|
|
42
42
|
"@wooksjs/event-core": "^0.5.25",
|
|
43
43
|
"wooks": "^0.5.25",
|
|
44
|
-
"moost": "^0.5.
|
|
44
|
+
"moost": "^0.5.24"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"vitest": "^3.0.5"
|