@nestjs/cli 10.1.7 → 10.1.9
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/build.action.js
CHANGED
|
@@ -4,17 +4,13 @@ exports.BuildAction = void 0;
|
|
|
4
4
|
const chalk = require("chalk");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const assets_manager_1 = require("../lib/compiler/assets-manager");
|
|
7
|
-
const compiler_1 = require("../lib/compiler/compiler");
|
|
8
7
|
const get_builder_1 = require("../lib/compiler/helpers/get-builder");
|
|
9
8
|
const get_tsc_config_path_1 = require("../lib/compiler/helpers/get-tsc-config.path");
|
|
10
9
|
const get_value_or_default_1 = require("../lib/compiler/helpers/get-value-or-default");
|
|
11
10
|
const get_webpack_config_path_1 = require("../lib/compiler/helpers/get-webpack-config-path");
|
|
12
11
|
const tsconfig_provider_1 = require("../lib/compiler/helpers/tsconfig-provider");
|
|
13
12
|
const plugins_loader_1 = require("../lib/compiler/plugins/plugins-loader");
|
|
14
|
-
const swc_compiler_1 = require("../lib/compiler/swc/swc-compiler");
|
|
15
13
|
const typescript_loader_1 = require("../lib/compiler/typescript-loader");
|
|
16
|
-
const watch_compiler_1 = require("../lib/compiler/watch-compiler");
|
|
17
|
-
const webpack_compiler_1 = require("../lib/compiler/webpack-compiler");
|
|
18
14
|
const workspace_utils_1 = require("../lib/compiler/workspace-utils");
|
|
19
15
|
const configuration_1 = require("../lib/configuration");
|
|
20
16
|
const defaults_1 = require("../lib/configuration/defaults");
|
|
@@ -74,7 +70,8 @@ class BuildAction extends abstract_action_1.AbstractAction {
|
|
|
74
70
|
}
|
|
75
71
|
}
|
|
76
72
|
async runSwc(configuration, appName, pathToTsconfig, watchMode, options, tsOptions, onSuccess) {
|
|
77
|
-
const
|
|
73
|
+
const { SwcCompiler } = await Promise.resolve().then(() => require('../lib/compiler/swc/swc-compiler'));
|
|
74
|
+
const swc = new SwcCompiler(this.pluginsLoader);
|
|
78
75
|
await swc.run(configuration, pathToTsconfig, appName, {
|
|
79
76
|
watch: watchMode,
|
|
80
77
|
typeCheck: (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.typeCheck', appName, 'typeCheck', options),
|
|
@@ -82,8 +79,9 @@ class BuildAction extends abstract_action_1.AbstractAction {
|
|
|
82
79
|
assetsManager: this.assetsManager,
|
|
83
80
|
}, onSuccess);
|
|
84
81
|
}
|
|
85
|
-
runWebpack(configuration, appName, commandOptions, pathToTsconfig, debug, watchMode, onSuccess) {
|
|
86
|
-
const
|
|
82
|
+
async runWebpack(configuration, appName, commandOptions, pathToTsconfig, debug, watchMode, onSuccess) {
|
|
83
|
+
const { WebpackCompiler } = await Promise.resolve().then(() => require('../lib/compiler/webpack-compiler'));
|
|
84
|
+
const webpackCompiler = new WebpackCompiler(this.pluginsLoader);
|
|
87
85
|
const webpackPath = (0, get_webpack_config_path_1.getWebpackConfigPath)(configuration, commandOptions, appName) ??
|
|
88
86
|
defaults_1.defaultWebpackConfigFilename;
|
|
89
87
|
const webpackConfigFactoryOrConfig = this.getWebpackConfigFactoryByPath(webpackPath, defaults_1.defaultWebpackConfigFilename);
|
|
@@ -95,14 +93,16 @@ class BuildAction extends abstract_action_1.AbstractAction {
|
|
|
95
93
|
assetsManager: this.assetsManager,
|
|
96
94
|
}, onSuccess);
|
|
97
95
|
}
|
|
98
|
-
runTsc(watchMode, options, configuration, pathToTsconfig, appName, onSuccess) {
|
|
96
|
+
async runTsc(watchMode, options, configuration, pathToTsconfig, appName, onSuccess) {
|
|
99
97
|
if (watchMode) {
|
|
100
|
-
const
|
|
98
|
+
const { WatchCompiler } = await Promise.resolve().then(() => require('../lib/compiler/watch-compiler'));
|
|
99
|
+
const watchCompiler = new WatchCompiler(this.pluginsLoader, this.tsConfigProvider, this.tsLoader);
|
|
101
100
|
const isPreserveWatchOutputEnabled = options.find((option) => option.name === 'preserveWatchOutput' && option.value === true);
|
|
102
101
|
watchCompiler.run(configuration, pathToTsconfig, appName, { preserveWatchOutput: !!isPreserveWatchOutputEnabled }, onSuccess);
|
|
103
102
|
}
|
|
104
103
|
else {
|
|
105
|
-
const
|
|
104
|
+
const { Compiler } = await Promise.resolve().then(() => require('../lib/compiler/compiler'));
|
|
105
|
+
const compiler = new Compiler(this.pluginsLoader, this.tsConfigProvider, this.tsLoader);
|
|
106
106
|
compiler.run(configuration, pathToTsconfig, appName, undefined, onSuccess);
|
|
107
107
|
this.assetsManager.closeWatchers();
|
|
108
108
|
}
|
|
@@ -142,6 +142,12 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
|
|
|
142
142
|
source === null) {
|
|
143
143
|
return source;
|
|
144
144
|
}
|
|
145
|
+
if (Array.isArray(target) && Array.isArray(source)) {
|
|
146
|
+
return source.reduce((acc, value, index) => {
|
|
147
|
+
acc[index] = this.deepMerge(target[index], value);
|
|
148
|
+
return acc;
|
|
149
|
+
}, target);
|
|
150
|
+
}
|
|
145
151
|
const merged = { ...target };
|
|
146
152
|
for (const key in source) {
|
|
147
153
|
if (source.hasOwnProperty(key)) {
|
|
@@ -14,7 +14,7 @@ function getRemainingFlags(cli) {
|
|
|
14
14
|
// skip it too
|
|
15
15
|
const prevKeyRaw = array[index - 1];
|
|
16
16
|
if (prevKeyRaw) {
|
|
17
|
-
const previousKey = camelCase(prevKeyRaw.replace(
|
|
17
|
+
const previousKey = camelCase(prevKeyRaw.replace(/--/g, '').replace('no', ''));
|
|
18
18
|
if (cli[previousKey] === item) {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.9",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/nestjs/nest-cli#readme",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@angular-devkit/core": "16.1.
|
|
42
|
-
"@angular-devkit/schematics": "16.1.
|
|
43
|
-
"@angular-devkit/schematics-cli": "16.1.
|
|
41
|
+
"@angular-devkit/core": "16.1.4",
|
|
42
|
+
"@angular-devkit/schematics": "16.1.4",
|
|
43
|
+
"@angular-devkit/schematics-cli": "16.1.4",
|
|
44
44
|
"@nestjs/schematics": "^10.0.1",
|
|
45
45
|
"chalk": "4.1.2",
|
|
46
46
|
"chokidar": "3.5.3",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"source-map-support": "0.5.21",
|
|
57
57
|
"tree-kill": "1.2.2",
|
|
58
58
|
"tsconfig-paths": "4.2.0",
|
|
59
|
-
"tsconfig-paths-webpack-plugin": "4.0
|
|
59
|
+
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
60
60
|
"typescript": "5.1.6",
|
|
61
61
|
"webpack": "5.88.1",
|
|
62
62
|
"webpack-node-externals": "3.0.0"
|
|
@@ -65,25 +65,25 @@
|
|
|
65
65
|
"@commitlint/cli": "17.6.6",
|
|
66
66
|
"@commitlint/config-angular": "17.6.6",
|
|
67
67
|
"@swc/cli": "0.1.62",
|
|
68
|
-
"@swc/core": "1.3.
|
|
68
|
+
"@swc/core": "1.3.69",
|
|
69
69
|
"@types/inquirer": "8.2.6",
|
|
70
|
-
"@types/jest": "29.5.
|
|
70
|
+
"@types/jest": "29.5.3",
|
|
71
71
|
"@types/node": "18.16.19",
|
|
72
72
|
"@types/node-emoji": "1.8.2",
|
|
73
73
|
"@types/shelljs": "0.8.12",
|
|
74
74
|
"@types/webpack-node-externals": "3.0.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "
|
|
76
|
-
"@typescript-eslint/parser": "
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "6.0.0",
|
|
76
|
+
"@typescript-eslint/parser": "6.0.0",
|
|
77
77
|
"delete-empty": "3.0.0",
|
|
78
|
-
"eslint": "8.
|
|
78
|
+
"eslint": "8.45.0",
|
|
79
79
|
"eslint-config-prettier": "8.8.0",
|
|
80
80
|
"gulp": "4.0.2",
|
|
81
81
|
"gulp-clean": "0.4.0",
|
|
82
82
|
"husky": "8.0.3",
|
|
83
|
-
"jest": "29.6.
|
|
83
|
+
"jest": "29.6.1",
|
|
84
84
|
"lint-staged": "13.2.3",
|
|
85
|
-
"prettier": "
|
|
86
|
-
"release-it": "
|
|
85
|
+
"prettier": "3.0.0",
|
|
86
|
+
"release-it": "16.1.2",
|
|
87
87
|
"ts-jest": "29.1.1",
|
|
88
88
|
"ts-loader": "9.4.4"
|
|
89
89
|
},
|