@jpp-toolkit/core 0.0.15 → 0.0.16
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.d.mts +7 -1
- package/package.json +2 -1
- package/src/command-types.ts +5 -0
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Logger } from "@jpp-toolkit/logger";
|
|
2
2
|
import { Command as Command$1, Config } from "@oclif/core";
|
|
3
|
+
import { Input, Output, OutputArgs } from "@oclif/parser";
|
|
3
4
|
|
|
5
|
+
//#region src/command-types.d.ts
|
|
6
|
+
type CommandOptions<T> = T extends Input<infer R> ? Output<R, OutputArgs> : never;
|
|
7
|
+
type CommandFlags<T> = CommandOptions<T>['flags'];
|
|
8
|
+
type CommandArgs<T> = CommandOptions<T>['args'];
|
|
9
|
+
//#endregion
|
|
4
10
|
//#region src/command.d.ts
|
|
5
11
|
declare abstract class Command extends Command$1 {
|
|
6
12
|
private readonly _logger;
|
|
@@ -9,5 +15,5 @@ declare abstract class Command extends Command$1 {
|
|
|
9
15
|
fatalError(message: string, exitCode?: number): never;
|
|
10
16
|
}
|
|
11
17
|
//#endregion
|
|
12
|
-
export { Command };
|
|
18
|
+
export { Command, CommandArgs, CommandFlags, CommandOptions };
|
|
13
19
|
//# sourceMappingURL=index.d.mts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jpp-toolkit/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Core utilities for jpp cli and plugins.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jpp",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"src"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@oclif/parser": "3.8.17",
|
|
33
34
|
"@jpp-toolkit/logger": "0.0.14"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Input, Output, OutputArgs } from '@oclif/parser';
|
|
2
|
+
|
|
3
|
+
export type CommandOptions<T> = T extends Input<infer R> ? Output<R, OutputArgs> : never;
|
|
4
|
+
export type CommandFlags<T> = CommandOptions<T>['flags'];
|
|
5
|
+
export type CommandArgs<T> = CommandOptions<T>['args'];
|
package/src/index.ts
CHANGED