@nestjs/cli 7.5.0 → 7.5.2
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/actions/abstract.action.js +1 -0
- package/actions/add.action.js +4 -3
- package/actions/build.action.js +7 -5
- package/actions/generate.action.js +7 -7
- package/actions/index.js +18 -11
- package/actions/info.action.js +4 -3
- package/actions/new.action.js +9 -8
- package/actions/start.action.js +7 -6
- package/actions/update.action.js +3 -2
- package/commands/abstract.command.js +1 -0
- package/commands/add.command.js +1 -0
- package/commands/build.command.js +1 -0
- package/commands/command.loader.js +1 -0
- package/commands/generate.command.js +8 -2
- package/commands/index.js +12 -4
- package/commands/info.command.js +1 -0
- package/commands/new.command.js +1 -0
- package/commands/start.command.js +1 -0
- package/commands/update.command.js +1 -0
- package/lib/compiler/assets-manager.js +3 -2
- package/lib/compiler/compiler.js +4 -3
- package/lib/compiler/defaults/webpack-defaults.js +1 -0
- package/lib/compiler/helpers/append-extension.js +1 -0
- package/lib/compiler/helpers/copy-path-resolve.js +2 -4
- package/lib/compiler/helpers/get-value-or-default.js +2 -1
- package/lib/compiler/helpers/tsconfig-provider.js +1 -0
- package/lib/compiler/hooks/tsconfig-paths.hook.js +12 -0
- package/lib/compiler/plugins-loader.js +11 -2
- package/lib/compiler/typescript-loader.d.ts +0 -1
- package/lib/compiler/typescript-loader.js +10 -26
- package/lib/compiler/watch-compiler.js +3 -2
- package/lib/compiler/webpack-compiler.d.ts +1 -1
- package/lib/compiler/webpack-compiler.js +8 -1
- package/lib/compiler/workspace-utils.js +2 -1
- package/lib/configuration/defaults.js +1 -0
- package/lib/configuration/index.js +13 -4
- package/lib/configuration/nest-configuration.loader.js +1 -0
- package/lib/dependency-managers/index.js +11 -4
- package/lib/dependency-managers/nest.dependency-manager.js +3 -2
- package/lib/package-managers/abstract.package-manager.d.ts +2 -2
- package/lib/package-managers/abstract.package-manager.js +5 -4
- package/lib/package-managers/index.js +17 -8
- package/lib/package-managers/npm.package-manager.d.ts +2 -2
- package/lib/package-managers/npm.package-manager.js +1 -0
- package/lib/package-managers/package-manager.factory.js +3 -2
- package/lib/package-managers/package-manager.js +1 -0
- package/lib/package-managers/yarn.package-manager.d.ts +2 -2
- package/lib/package-managers/yarn.package-manager.js +1 -0
- package/lib/questions/questions.js +1 -0
- package/lib/readers/file-system.reader.js +1 -0
- package/lib/readers/index.js +12 -4
- package/lib/runners/abstract.runner.d.ts +2 -1
- package/lib/runners/abstract.runner.js +6 -4
- package/lib/runners/git.runner.js +1 -0
- package/lib/runners/index.js +13 -6
- package/lib/runners/npm.runner.js +1 -0
- package/lib/runners/runner.factory.js +1 -0
- package/lib/runners/runner.js +1 -0
- package/lib/runners/schematic.runner.js +7 -10
- package/lib/runners/yarn.runner.js +1 -0
- package/lib/schematics/abstract.collection.js +1 -0
- package/lib/schematics/collection.factory.js +1 -0
- package/lib/schematics/collection.js +1 -0
- package/lib/schematics/custom.collection.js +1 -0
- package/lib/schematics/index.js +14 -7
- package/lib/schematics/nest.collection.d.ts +1 -0
- package/lib/schematics/nest.collection.js +101 -20
- package/lib/schematics/schematic.option.js +1 -0
- package/lib/ui/banner.js +1 -0
- package/lib/ui/emojis.js +1 -0
- package/lib/ui/errors.js +1 -0
- package/lib/ui/index.js +15 -8
- package/lib/ui/messages.js +1 -0
- package/lib/ui/prefixes.js +1 -0
- package/lib/utils/is-error.js +1 -0
- package/lib/utils/load-configuration.js +1 -0
- package/lib/utils/local-binaries.js +1 -0
- package/lib/utils/project-utils.js +2 -1
- package/lib/utils/remaining-flags.js +1 -0
- package/package.json +26 -25
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NestCollection = void 0;
|
|
12
13
|
const abstract_collection_1 = require("./abstract.collection");
|
|
13
14
|
class NestCollection extends abstract_collection_1.AbstractCollection {
|
|
14
15
|
constructor(runner) {
|
|
@@ -36,24 +37,104 @@ class NestCollection extends abstract_collection_1.AbstractCollection {
|
|
|
36
37
|
}
|
|
37
38
|
exports.NestCollection = NestCollection;
|
|
38
39
|
NestCollection.schematics = [
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
{
|
|
41
|
+
name: 'application',
|
|
42
|
+
alias: 'application',
|
|
43
|
+
description: 'Generate a new application workspace',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: 'angular-app',
|
|
47
|
+
alias: 'ng-app',
|
|
48
|
+
description: '',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'class',
|
|
52
|
+
alias: 'cl',
|
|
53
|
+
description: 'Generate a new class',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'configuration',
|
|
57
|
+
alias: 'config',
|
|
58
|
+
description: 'Generate a CLI configuration file',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'controller',
|
|
62
|
+
alias: 'co',
|
|
63
|
+
description: 'Generate a controller declaration',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: 'decorator',
|
|
67
|
+
alias: 'd',
|
|
68
|
+
description: 'Generate a custom decorator',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'filter',
|
|
72
|
+
alias: 'f',
|
|
73
|
+
description: 'Generate a filter declaration',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'gateway',
|
|
77
|
+
alias: 'ga',
|
|
78
|
+
description: 'Generate a gateway declaration',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'guard',
|
|
82
|
+
alias: 'gu',
|
|
83
|
+
description: 'Generate a guard declaration',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'interceptor',
|
|
87
|
+
alias: 'in',
|
|
88
|
+
description: 'Generate an interceptor declaration',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'interface',
|
|
92
|
+
alias: 'interface',
|
|
93
|
+
description: 'Generate an interface',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'middleware',
|
|
97
|
+
alias: 'mi',
|
|
98
|
+
description: 'Generate a middleware declaration',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'module',
|
|
102
|
+
alias: 'mo',
|
|
103
|
+
description: 'Generate a module declaration',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'pipe',
|
|
107
|
+
alias: 'pi',
|
|
108
|
+
description: 'Generate a pipe declaration',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'provider',
|
|
112
|
+
alias: 'pr',
|
|
113
|
+
description: 'Generate a provider declaration',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'resolver',
|
|
117
|
+
alias: 'r',
|
|
118
|
+
description: 'Generate a GraphQL resolver declaration',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'service',
|
|
122
|
+
alias: 's',
|
|
123
|
+
description: 'Generate a service declaration',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'library',
|
|
127
|
+
alias: 'lib',
|
|
128
|
+
description: 'Generate a new library within a monorepo',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'sub-app',
|
|
132
|
+
alias: 'app',
|
|
133
|
+
description: 'Generate a new application within a monorepo',
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'resource',
|
|
137
|
+
alias: 'res',
|
|
138
|
+
description: 'Generate a new CRUD resource',
|
|
139
|
+
},
|
|
59
140
|
];
|
package/lib/ui/banner.js
CHANGED
package/lib/ui/emojis.js
CHANGED
package/lib/ui/errors.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// tslint:disable:max-line-length
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CLI_ERRORS = void 0;
|
|
4
5
|
exports.CLI_ERRORS = {
|
|
5
6
|
MISSING_TYPESCRIPT: (path) => `Could not find TypeScript configuration file "${path}". Please, ensure that you are running this command in the appropriate directory (inside Nest workspace).`,
|
|
6
7
|
WRONG_PLUGIN: (name) => `The "${name}" plugin is not compatible with Nest CLI. Neither "after()" nor "before()" function have been provided.`,
|
package/lib/ui/index.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
5
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
__exportStar(require("./banner"), exports);
|
|
14
|
+
__exportStar(require("./emojis"), exports);
|
|
15
|
+
__exportStar(require("./errors"), exports);
|
|
16
|
+
__exportStar(require("./messages"), exports);
|
|
17
|
+
__exportStar(require("./prefixes"), exports);
|
package/lib/ui/messages.js
CHANGED
package/lib/ui/prefixes.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INFO_PREFIX = exports.ERROR_PREFIX = void 0;
|
|
3
4
|
const chalk = require("chalk");
|
|
4
5
|
exports.ERROR_PREFIX = chalk.bgRgb(210, 0, 75).bold.rgb(0, 0, 0)(' Error ');
|
|
5
6
|
exports.INFO_PREFIX = chalk.bgRgb(60, 190, 100).bold.rgb(0, 0, 0)(' Info ');
|
package/lib/utils/is-error.js
CHANGED
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.loadConfiguration = void 0;
|
|
12
13
|
const nest_configuration_loader_1 = require("../configuration/nest-configuration.loader");
|
|
13
14
|
const readers_1 = require("../readers");
|
|
14
15
|
function loadConfiguration() {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadLocalBinCommandLoader = exports.localBinExists = void 0;
|
|
3
4
|
const fs_1 = require("fs");
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const localBinPathSegments = [process.cwd(), 'node_modules', '@nestjs', 'cli'];
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.moveDefaultProjectToStart = exports.askForProjectName = exports.shouldGenerateSpec = exports.shouldAskForProject = void 0;
|
|
12
13
|
const inquirer = require("inquirer");
|
|
13
14
|
const get_value_or_default_1 = require("../compiler/helpers/get-value-or-default");
|
|
14
15
|
const questions_1 = require("../questions/questions");
|
|
@@ -60,7 +61,7 @@ exports.askForProjectName = askForProjectName;
|
|
|
60
61
|
function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLabel) {
|
|
61
62
|
let projects = Object.keys(configuration.projects);
|
|
62
63
|
if (configuration.sourceRoot !== 'src') {
|
|
63
|
-
projects = projects.filter(p => p !== defaultProjectName.replace(defaultLabel, ''));
|
|
64
|
+
projects = projects.filter((p) => p !== defaultProjectName.replace(defaultLabel, ''));
|
|
64
65
|
}
|
|
65
66
|
projects.unshift(defaultProjectName);
|
|
66
67
|
return projects;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.2",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"format": "prettier --write \"**/*.ts\"",
|
|
19
19
|
"lint": "eslint '{lib,commands,actions}/**/*.ts' --fix",
|
|
20
20
|
"start": "node bin/nest.js",
|
|
21
|
+
"prepack": "npm run build",
|
|
21
22
|
"prepublish:next": "npm run build",
|
|
22
23
|
"publish:next": "npm publish --access public --tag next",
|
|
23
24
|
"prepublish:npm": "npm run build",
|
|
@@ -42,35 +43,35 @@
|
|
|
42
43
|
},
|
|
43
44
|
"homepage": "https://github.com/nestjs/nest-cli#readme",
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@angular-devkit/core": "10.0
|
|
46
|
-
"@angular-devkit/schematics": "10.0
|
|
47
|
-
"@angular-devkit/schematics-cli": "0.
|
|
46
|
+
"@angular-devkit/core": "10.2.0",
|
|
47
|
+
"@angular-devkit/schematics": "10.2.0",
|
|
48
|
+
"@angular-devkit/schematics-cli": "0.1002.0",
|
|
48
49
|
"@nestjs/schematics": "^7.1.0",
|
|
49
|
-
"@types/webpack": "4.41.
|
|
50
|
+
"@types/webpack": "4.41.24",
|
|
50
51
|
"chalk": "3.0.0",
|
|
51
|
-
"chokidar": "3.4.
|
|
52
|
+
"chokidar": "3.4.3",
|
|
52
53
|
"cli-table3": "0.5.1",
|
|
53
54
|
"commander": "4.1.1",
|
|
54
|
-
"fork-ts-checker-webpack-plugin": "5.1
|
|
55
|
+
"fork-ts-checker-webpack-plugin": "5.2.1",
|
|
55
56
|
"inquirer": "7.3.3",
|
|
56
57
|
"node-emoji": "1.10.0",
|
|
57
|
-
"ora": "5.
|
|
58
|
-
"os-name": "
|
|
58
|
+
"ora": "5.1.0",
|
|
59
|
+
"os-name": "4.0.0",
|
|
59
60
|
"rimraf": "3.0.2",
|
|
60
61
|
"shelljs": "0.8.4",
|
|
61
62
|
"tree-kill": "1.2.2",
|
|
62
63
|
"tsconfig-paths": "3.9.0",
|
|
63
64
|
"tsconfig-paths-webpack-plugin": "3.3.0",
|
|
64
|
-
"typescript": "
|
|
65
|
-
"webpack": "4.
|
|
66
|
-
"webpack-node-externals": "2.5.
|
|
65
|
+
"typescript": "4.0.5",
|
|
66
|
+
"webpack": "5.4.0",
|
|
67
|
+
"webpack-node-externals": "2.5.2"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
|
-
"@commitlint/cli": "
|
|
70
|
-
"@commitlint/config-angular": "
|
|
71
|
-
"@types/copyfiles": "2.
|
|
70
|
+
"@commitlint/cli": "11.0.0",
|
|
71
|
+
"@commitlint/config-angular": "11.0.0",
|
|
72
|
+
"@types/copyfiles": "2.4.0",
|
|
72
73
|
"@types/inquirer": "7.3.1",
|
|
73
|
-
"@types/jest": "26.0.
|
|
74
|
+
"@types/jest": "26.0.15",
|
|
74
75
|
"@types/node": "12.12.31",
|
|
75
76
|
"@types/node-emoji": "1.8.1",
|
|
76
77
|
"@types/ora": "3.1.0",
|
|
@@ -81,17 +82,17 @@
|
|
|
81
82
|
"@typescript-eslint/eslint-plugin": "^2.19.0",
|
|
82
83
|
"@typescript-eslint/parser": "^2.19.0",
|
|
83
84
|
"delete-empty": "3.0.0",
|
|
84
|
-
"eslint": "7.
|
|
85
|
-
"eslint-config-prettier": "6.
|
|
86
|
-
"eslint-plugin-import": "2.22.
|
|
85
|
+
"eslint": "7.12.0",
|
|
86
|
+
"eslint-config-prettier": "6.15.0",
|
|
87
|
+
"eslint-plugin-import": "2.22.1",
|
|
87
88
|
"gulp": "4.0.2",
|
|
88
89
|
"gulp-clean": "0.4.0",
|
|
89
|
-
"husky": "4.
|
|
90
|
-
"jest": "26.
|
|
91
|
-
"prettier": "2.
|
|
92
|
-
"release-it": "
|
|
93
|
-
"ts-jest": "26.
|
|
94
|
-
"ts-loader": "8.0.
|
|
90
|
+
"husky": "4.3.0",
|
|
91
|
+
"jest": "26.6.3",
|
|
92
|
+
"prettier": "2.1.2",
|
|
93
|
+
"release-it": "14.2.1",
|
|
94
|
+
"ts-jest": "26.4.3",
|
|
95
|
+
"ts-loader": "8.0.8",
|
|
95
96
|
"ts-node": "9.0.0"
|
|
96
97
|
},
|
|
97
98
|
"husky": {
|