@nestjs/cli 8.1.5 → 8.1.6
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/.eslintrc.js +1 -2
- package/commands/generate.command.js +1 -1
- package/lib/compiler/hooks/tsconfig-paths.hook.js +1 -0
- package/lib/utils/project-utils.js +1 -1
- package/lib/utils/tree-kill.js +3 -3
- package/package.json +17 -17
- package/test/lib/compiler/hooks/__snapshots__/tsconfig-paths.hook.spec.ts.snap +23 -0
package/.eslintrc.js
CHANGED
|
@@ -62,7 +62,7 @@ class GenerateCommand extends abstract_command_1.AbstractCommand {
|
|
|
62
62
|
}
|
|
63
63
|
buildDescription() {
|
|
64
64
|
return ('Generate a Nest element.\n' +
|
|
65
|
-
|
|
65
|
+
` Schematics available on ${chalk.bold('@nestjs/schematics')} collection:\n` +
|
|
66
66
|
this.buildSchematicsListAsTable());
|
|
67
67
|
}
|
|
68
68
|
buildSchematicsListAsTable() {
|
|
@@ -59,7 +59,7 @@ function askForProjectName(promptQuestion, projects) {
|
|
|
59
59
|
}
|
|
60
60
|
exports.askForProjectName = askForProjectName;
|
|
61
61
|
function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLabel) {
|
|
62
|
-
let projects = Object.keys(configuration.projects);
|
|
62
|
+
let projects = configuration.projects != null ? Object.keys(configuration.projects) : [];
|
|
63
63
|
if (configuration.sourceRoot !== 'src') {
|
|
64
64
|
projects = projects.filter((p) => p !== defaultProjectName.replace(defaultLabel, ''));
|
|
65
65
|
}
|
package/lib/utils/tree-kill.js
CHANGED
|
@@ -23,7 +23,7 @@ function getAllPid() {
|
|
|
23
23
|
.slice(1);
|
|
24
24
|
return rows
|
|
25
25
|
.map(function (row) {
|
|
26
|
-
|
|
26
|
+
const parts = row.match(/\s*(\d+)\s*(\d+)/);
|
|
27
27
|
if (parts === null) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
@@ -38,8 +38,8 @@ function getAllPid() {
|
|
|
38
38
|
}
|
|
39
39
|
function getAllChilds(pid) {
|
|
40
40
|
const allpid = getAllPid();
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const ppidHash = {};
|
|
42
|
+
const result = [];
|
|
43
43
|
allpid.forEach(function (item) {
|
|
44
44
|
ppidHash[item.ppid] = ppidHash[item.ppid] || [];
|
|
45
45
|
ppidHash[item.ppid].push(item.pid);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.6",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -43,27 +43,27 @@
|
|
|
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.1.1",
|
|
47
|
+
"@angular-devkit/schematics": "13.1.1",
|
|
48
|
+
"@angular-devkit/schematics-cli": "13.1.1",
|
|
49
49
|
"@nestjs/schematics": "^8.0.3",
|
|
50
50
|
"chalk": "3.0.0",
|
|
51
51
|
"chokidar": "3.5.2",
|
|
52
52
|
"cli-table3": "0.6.0",
|
|
53
53
|
"commander": "4.1.1",
|
|
54
|
-
"fork-ts-checker-webpack-plugin": "6.
|
|
54
|
+
"fork-ts-checker-webpack-plugin": "6.5.0",
|
|
55
55
|
"inquirer": "7.3.3",
|
|
56
56
|
"node-emoji": "1.11.0",
|
|
57
57
|
"ora": "5.4.1",
|
|
58
58
|
"os-name": "4.0.1",
|
|
59
59
|
"rimraf": "3.0.2",
|
|
60
60
|
"shelljs": "0.8.4",
|
|
61
|
-
"source-map-support": "0.5.
|
|
61
|
+
"source-map-support": "0.5.21",
|
|
62
62
|
"tree-kill": "1.2.2",
|
|
63
|
-
"tsconfig-paths": "3.
|
|
63
|
+
"tsconfig-paths": "3.12.0",
|
|
64
64
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
65
65
|
"typescript": "4.3.5",
|
|
66
|
-
"webpack": "5.
|
|
66
|
+
"webpack": "5.65.0",
|
|
67
67
|
"webpack-node-externals": "3.0.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
@@ -71,27 +71,27 @@
|
|
|
71
71
|
"@commitlint/config-angular": "15.0.0",
|
|
72
72
|
"@types/copyfiles": "2.4.1",
|
|
73
73
|
"@types/inquirer": "7.3.3",
|
|
74
|
-
"@types/jest": "27.0.
|
|
75
|
-
"@types/node": "16.11.
|
|
74
|
+
"@types/jest": "27.0.3",
|
|
75
|
+
"@types/node": "16.11.12",
|
|
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
80
|
"@types/shelljs": "0.8.9",
|
|
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.6.0",
|
|
83
|
+
"@typescript-eslint/parser": "5.6.0",
|
|
84
84
|
"delete-empty": "3.0.0",
|
|
85
|
-
"eslint": "8.
|
|
85
|
+
"eslint": "8.4.1",
|
|
86
86
|
"eslint-config-prettier": "8.3.0",
|
|
87
87
|
"eslint-plugin-import": "2.25.3",
|
|
88
88
|
"gulp": "4.0.2",
|
|
89
89
|
"gulp-clean": "0.4.0",
|
|
90
90
|
"husky": "7.0.4",
|
|
91
|
-
"jest": "27.
|
|
92
|
-
"prettier": "2.
|
|
93
|
-
"release-it": "14.11.
|
|
94
|
-
"ts-jest": "27.
|
|
91
|
+
"jest": "27.4.4",
|
|
92
|
+
"prettier": "2.5.1",
|
|
93
|
+
"release-it": "14.11.8",
|
|
94
|
+
"ts-jest": "27.1.1",
|
|
95
95
|
"ts-loader": "9.2.6",
|
|
96
96
|
"ts-node": "10.4.0"
|
|
97
97
|
},
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`tsconfig paths hooks should remove unused imports 1`] = `
|
|
4
|
+
Map {
|
|
5
|
+
"dist/foo.js" => "\\"use strict\\";
|
|
6
|
+
Object.defineProperty(exports, \\"__esModule\\", { value: true });
|
|
7
|
+
exports.Foo = void 0;
|
|
8
|
+
class Foo {
|
|
9
|
+
}
|
|
10
|
+
exports.Foo = Foo;
|
|
11
|
+
",
|
|
12
|
+
"dist/bar.js" => "\\"use strict\\";
|
|
13
|
+
Object.defineProperty(exports, \\"__esModule\\", { value: true });
|
|
14
|
+
exports.Bar = void 0;
|
|
15
|
+
class Bar {
|
|
16
|
+
}
|
|
17
|
+
exports.Bar = Bar;
|
|
18
|
+
",
|
|
19
|
+
"dist/main.js" => "\\"use strict\\";
|
|
20
|
+
Object.defineProperty(exports, \\"__esModule\\", { value: true });
|
|
21
|
+
",
|
|
22
|
+
}
|
|
23
|
+
`;
|