@tsed/cli-core 3.14.1 → 3.17.0
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/lib/index.js +25 -14
- package/lib/index.js.map +1 -1
- package/lib/index.modern.js +25 -14
- package/lib/index.modern.js.map +1 -1
- package/lib/interfaces/CommandProvider.d.ts +5 -0
- package/lib/services/CliDockerComposeYaml.d.ts +1 -1
- package/lib/services/CliService.d.ts +6 -0
- package/lib/services/CliYaml.d.ts +1 -1
- package/package.json +6 -6
|
@@ -2,6 +2,11 @@ import Inquirer from "inquirer";
|
|
|
2
2
|
import { Tasks } from "./Tasks";
|
|
3
3
|
export declare type QuestionOptions<T = any> = Inquirer.QuestionCollection<T>;
|
|
4
4
|
export interface CommandProvider<Ctx = any> {
|
|
5
|
+
/**
|
|
6
|
+
* Run a function before the main prompt. Useful for pre-loading data from the file system
|
|
7
|
+
* @param initialOptions
|
|
8
|
+
*/
|
|
9
|
+
$beforePrompt?(initialOptions: Partial<Ctx>): Partial<Ctx>;
|
|
5
10
|
/**
|
|
6
11
|
* Hook to create the main prompt for the command
|
|
7
12
|
* See https://github.com/enquirer/enquirer for more detail on question configuration.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CliYaml } from "./CliYaml";
|
|
2
2
|
export declare class CliDockerComposeYaml {
|
|
3
3
|
protected cliYaml: CliYaml;
|
|
4
|
-
read(): Promise<
|
|
4
|
+
read(): Promise<unknown>;
|
|
5
5
|
write(obj: any): Promise<void>;
|
|
6
6
|
addDatabaseService(name: string, database: string): Promise<void>;
|
|
7
7
|
}
|
|
@@ -24,6 +24,12 @@ export declare class CliService {
|
|
|
24
24
|
*/
|
|
25
25
|
runLifecycle(cmdName: string, data?: any): Promise<void>;
|
|
26
26
|
exec(cmdName: string, ctx: any): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Run prompt for a given command
|
|
29
|
+
* @param cmdName
|
|
30
|
+
* @param ctx Initial data
|
|
31
|
+
*/
|
|
32
|
+
beforePrompt(cmdName: string, ctx?: any): Promise<any>;
|
|
27
33
|
/**
|
|
28
34
|
* Run prompt for a given command
|
|
29
35
|
* @param cmdName
|
|
@@ -3,6 +3,6 @@ import { ProjectPackageJson } from "./ProjectPackageJson";
|
|
|
3
3
|
export declare class CliYaml {
|
|
4
4
|
protected projectPackageJson: ProjectPackageJson;
|
|
5
5
|
protected fs: CliFs;
|
|
6
|
-
read(path: string): Promise<
|
|
6
|
+
read(path: string): Promise<unknown>;
|
|
7
7
|
write(path: string, obj: any): Promise<void>;
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"description": "Build your CLI with TypeScript and Decorators",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@npmcli/run-script": "1.8.5",
|
|
27
27
|
"@samverschueren/stream-to-observable": "^0.3.1",
|
|
28
|
-
"@tsed/logger": "
|
|
28
|
+
"@tsed/logger": ">=6.0.0",
|
|
29
29
|
"any-observable": "0.5.1",
|
|
30
30
|
"axios": "0.21.4",
|
|
31
31
|
"chalk": "4.1.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"inquirer": "8.0.0",
|
|
43
43
|
"inquirer-autocomplete-prompt": "1.3.0",
|
|
44
44
|
"js-yaml": "4.1.0",
|
|
45
|
-
"listr2": "3.
|
|
45
|
+
"listr2": "3.13.1",
|
|
46
46
|
"module-alias": "2.2.2",
|
|
47
47
|
"normalize-path": "3.0.0",
|
|
48
48
|
"read-pkg-up": "7.0.1",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/fs-extra": "9.0.6",
|
|
64
64
|
"@types/globby": "9.1.0",
|
|
65
65
|
"@types/inquirer": "7.3.1",
|
|
66
|
-
"@types/js-yaml": "4.0.
|
|
66
|
+
"@types/js-yaml": "4.0.4",
|
|
67
67
|
"@types/listr": "0.14.2",
|
|
68
68
|
"@types/read-pkg-up": "6.0.0",
|
|
69
69
|
"@types/semver": "7.3.5",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@types/url-parse": "^1.4.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@tsed/core": "
|
|
76
|
-
"@tsed/di": "
|
|
75
|
+
"@tsed/core": ">=6.95.1",
|
|
76
|
+
"@tsed/di": ">=6.95.1"
|
|
77
77
|
},
|
|
78
78
|
"repository": "https://github.com/tsedio/tsed-cli",
|
|
79
79
|
"bugs": {
|