@nestjs/cli 8.2.0 → 8.2.1
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/package-managers/abstract.package-manager.js +5 -3
- package/lib/package-managers/npm.package-manager.js +1 -0
- package/lib/package-managers/package-manager-commands.d.ts +1 -0
- package/lib/package-managers/pnpm.package-manager.js +1 -0
- package/lib/package-managers/yarn.package-manager.js +1 -0
- package/lib/runners/abstract.runner.d.ts +5 -0
- package/lib/runners/abstract.runner.js +8 -0
- package/lib/ui/messages.d.ts +1 -1
- package/lib/ui/messages.js +1 -1
- package/package.json +14 -14
|
@@ -31,10 +31,10 @@ class AbstractPackageManager {
|
|
|
31
31
|
});
|
|
32
32
|
spinner.start();
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
34
|
+
const commandArgs = `${this.cli.install} ${this.cli.silentFlag}`;
|
|
35
35
|
const collect = true;
|
|
36
36
|
const dasherizedDirectory = (0, strings_1.dasherize)(directory);
|
|
37
|
-
yield this.runner.run(
|
|
37
|
+
yield this.runner.run(commandArgs, collect, (0, path_1.join)(process.cwd(), dasherizedDirectory));
|
|
38
38
|
spinner.succeed();
|
|
39
39
|
console.info();
|
|
40
40
|
console.info(ui_1.MESSAGES.PACKAGE_MANAGER_INSTALLATION_SUCCEED(directory));
|
|
@@ -46,7 +46,9 @@ class AbstractPackageManager {
|
|
|
46
46
|
}
|
|
47
47
|
catch (_a) {
|
|
48
48
|
spinner.fail();
|
|
49
|
-
|
|
49
|
+
const commandArgs = this.cli.install;
|
|
50
|
+
const commandToRun = this.runner.rawFullCommand(commandArgs);
|
|
51
|
+
console.error(chalk.red(ui_1.MESSAGES.PACKAGE_MANAGER_INSTALLATION_FAILED(chalk.bold(commandToRun))));
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
}
|
|
@@ -3,4 +3,9 @@ export declare class AbstractRunner {
|
|
|
3
3
|
protected args: string[];
|
|
4
4
|
constructor(binary: string, args?: string[]);
|
|
5
5
|
run(command: string, collect?: boolean, cwd?: string): Promise<null | string>;
|
|
6
|
+
/**
|
|
7
|
+
* @param command
|
|
8
|
+
* @returns The entire command that will be ran when calling `run(command)`.
|
|
9
|
+
*/
|
|
10
|
+
rawFullCommand(command: string): string;
|
|
6
11
|
}
|
|
@@ -43,5 +43,13 @@ class AbstractRunner {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* @param command
|
|
48
|
+
* @returns The entire command that will be ran when calling `run(command)`.
|
|
49
|
+
*/
|
|
50
|
+
rawFullCommand(command) {
|
|
51
|
+
const commandArgs = [...this.args, command];
|
|
52
|
+
return `${this.binary} ${commandArgs.join(' ')}`;
|
|
53
|
+
}
|
|
46
54
|
}
|
|
47
55
|
exports.AbstractRunner = AbstractRunner;
|
package/lib/ui/messages.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const MESSAGES: {
|
|
|
14
14
|
GET_STARTED_INFORMATION: string;
|
|
15
15
|
CHANGE_DIR_COMMAND: (name: string) => string;
|
|
16
16
|
START_COMMAND: (name: string) => string;
|
|
17
|
-
PACKAGE_MANAGER_INSTALLATION_FAILED: string;
|
|
17
|
+
PACKAGE_MANAGER_INSTALLATION_FAILED: (commandToRunManually: string) => string;
|
|
18
18
|
NEST_INFORMATION_PACKAGE_MANAGER_FAILED: string;
|
|
19
19
|
LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE: (name: string) => string;
|
|
20
20
|
LIBRARY_INSTALLATION_FAILED_NO_LIBRARY: string;
|
package/lib/ui/messages.js
CHANGED
|
@@ -21,7 +21,7 @@ exports.MESSAGES = {
|
|
|
21
21
|
GET_STARTED_INFORMATION: `${emojis_1.EMOJIS.POINT_RIGHT} Get started with the following commands:`,
|
|
22
22
|
CHANGE_DIR_COMMAND: (name) => `$ cd ${name}`,
|
|
23
23
|
START_COMMAND: (name) => `$ ${name} run start`,
|
|
24
|
-
PACKAGE_MANAGER_INSTALLATION_FAILED: `${emojis_1.EMOJIS.SCREAM} Packages installation failed, see
|
|
24
|
+
PACKAGE_MANAGER_INSTALLATION_FAILED: (commandToRunManually) => `${emojis_1.EMOJIS.SCREAM} Packages installation failed!\nIn case you don't see any errors above, consider manually running the failed command ${commandToRunManually} to see more details on why it errored out.`,
|
|
25
25
|
// tslint:disable-next-line:max-line-length
|
|
26
26
|
NEST_INFORMATION_PACKAGE_MANAGER_FAILED: `${emojis_1.EMOJIS.SMIRK} cannot read your project package.json file, are you inside your project directory?`,
|
|
27
27
|
LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE: (name) => `Unable to install library ${name} because package did not install. Please check package name.`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/nestjs/nest-cli#readme",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@angular-devkit/core": "13.
|
|
47
|
-
"@angular-devkit/schematics": "13.
|
|
48
|
-
"@angular-devkit/schematics-cli": "13.
|
|
46
|
+
"@angular-devkit/core": "13.2.3",
|
|
47
|
+
"@angular-devkit/schematics": "13.2.3",
|
|
48
|
+
"@angular-devkit/schematics-cli": "13.2.3",
|
|
49
49
|
"@nestjs/schematics": "^8.0.3",
|
|
50
50
|
"chalk": "3.0.0",
|
|
51
|
-
"chokidar": "3.5.
|
|
51
|
+
"chokidar": "3.5.3",
|
|
52
52
|
"cli-table3": "0.6.1",
|
|
53
53
|
"commander": "4.1.1",
|
|
54
54
|
"fork-ts-checker-webpack-plugin": "6.5.0",
|
|
@@ -62,27 +62,27 @@
|
|
|
62
62
|
"tree-kill": "1.2.2",
|
|
63
63
|
"tsconfig-paths": "3.12.0",
|
|
64
64
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
65
|
-
"typescript": "4.5.
|
|
65
|
+
"typescript": "4.5.5",
|
|
66
66
|
"webpack": "5.66.0",
|
|
67
67
|
"webpack-node-externals": "3.0.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@commitlint/cli": "16.0
|
|
70
|
+
"@commitlint/cli": "16.1.0",
|
|
71
71
|
"@commitlint/config-angular": "16.0.0",
|
|
72
72
|
"@types/copyfiles": "2.4.1",
|
|
73
73
|
"@types/inquirer": "7.3.3",
|
|
74
74
|
"@types/jest": "27.4.0",
|
|
75
|
-
"@types/node": "16.11.
|
|
75
|
+
"@types/node": "16.11.24",
|
|
76
76
|
"@types/node-emoji": "1.8.1",
|
|
77
77
|
"@types/ora": "3.2.0",
|
|
78
78
|
"@types/os-name": "3.1.0",
|
|
79
79
|
"@types/rimraf": "3.0.2",
|
|
80
|
-
"@types/shelljs": "0.8.
|
|
80
|
+
"@types/shelljs": "0.8.11",
|
|
81
81
|
"@types/webpack-node-externals": "2.5.3",
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
83
|
-
"@typescript-eslint/parser": "5.
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "5.10.0",
|
|
83
|
+
"@typescript-eslint/parser": "5.10.0",
|
|
84
84
|
"delete-empty": "3.0.0",
|
|
85
|
-
"eslint": "8.
|
|
85
|
+
"eslint": "8.7.0",
|
|
86
86
|
"eslint-config-prettier": "8.3.0",
|
|
87
87
|
"eslint-plugin-import": "2.25.4",
|
|
88
88
|
"gulp": "4.0.2",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"husky": "7.0.4",
|
|
91
91
|
"jest": "27.4.7",
|
|
92
92
|
"prettier": "2.5.1",
|
|
93
|
-
"release-it": "14.12.
|
|
94
|
-
"ts-jest": "27.1.
|
|
93
|
+
"release-it": "14.12.4",
|
|
94
|
+
"ts-jest": "27.1.3",
|
|
95
95
|
"ts-loader": "9.2.6",
|
|
96
96
|
"ts-node": "10.4.0"
|
|
97
97
|
},
|