@nestjs/cli 9.4.1 → 9.4.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/.circleci/config.yml
CHANGED
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
build:
|
|
22
22
|
working_directory: ~/nest
|
|
23
23
|
docker:
|
|
24
|
-
- image: cimg/node:
|
|
24
|
+
- image: cimg/node:20.0
|
|
25
25
|
steps:
|
|
26
26
|
- checkout
|
|
27
27
|
- run:
|
|
@@ -43,7 +43,7 @@ jobs:
|
|
|
43
43
|
unit_tests:
|
|
44
44
|
working_directory: ~/nest
|
|
45
45
|
docker:
|
|
46
|
-
- image: cimg/node:
|
|
46
|
+
- image: cimg/node:20.0
|
|
47
47
|
steps:
|
|
48
48
|
- checkout
|
|
49
49
|
- *restore-cache
|
package/actions/build.action.js
CHANGED
|
@@ -76,7 +76,7 @@ class BuildAction extends abstract_action_1.AbstractAction {
|
|
|
76
76
|
if (isWebpackEnabled) {
|
|
77
77
|
const webpackPath = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.webpackConfigPath', appName, 'webpackPath', options);
|
|
78
78
|
const webpackConfigFactoryOrConfig = this.getWebpackConfigFactoryByPath(webpackPath, configuration.compilerOptions.webpackConfigPath);
|
|
79
|
-
return this.webpackCompiler.run(configuration, webpackConfigFactoryOrConfig, pathToTsconfig, appName, isDebugEnabled, watchMode, this.assetsManager, onSuccess);
|
|
79
|
+
return this.webpackCompiler.run(configuration, options, webpackConfigFactoryOrConfig, pathToTsconfig, appName, isDebugEnabled, watchMode, this.assetsManager, onSuccess);
|
|
80
80
|
}
|
|
81
81
|
if (watchMode) {
|
|
82
82
|
const tsCompilerOptions = {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Configuration } from '../configuration';
|
|
2
2
|
import { AssetsManager } from './assets-manager';
|
|
3
3
|
import { PluginsLoader } from './plugins-loader';
|
|
4
|
+
import { Input } from '../../commands';
|
|
4
5
|
import webpack = require('webpack');
|
|
5
6
|
type WebpackConfigFactory = (config: webpack.Configuration, webpackRef: typeof webpack) => webpack.Configuration;
|
|
6
7
|
type WebpackConfigFactoryOrConfig = WebpackConfigFactory | webpack.Configuration;
|
|
7
8
|
export declare class WebpackCompiler {
|
|
8
9
|
private readonly pluginsLoader;
|
|
9
10
|
constructor(pluginsLoader: PluginsLoader);
|
|
10
|
-
run(configuration: Required<Configuration>, webpackConfigFactoryOrConfig: WebpackConfigFactoryOrConfig | WebpackConfigFactoryOrConfig[], tsConfigPath: string, appName: string, isDebugEnabled: boolean | undefined, watchMode: boolean | undefined, assetsManager: AssetsManager, onSuccess?: () => void): void;
|
|
11
|
+
run(configuration: Required<Configuration>, options: Input[], webpackConfigFactoryOrConfig: WebpackConfigFactoryOrConfig | WebpackConfigFactoryOrConfig[], tsConfigPath: string, appName: string, isDebugEnabled: boolean | undefined, watchMode: boolean | undefined, assetsManager: AssetsManager, onSuccess?: () => void): void;
|
|
11
12
|
}
|
|
12
13
|
export {};
|
|
@@ -11,7 +11,7 @@ class WebpackCompiler {
|
|
|
11
11
|
constructor(pluginsLoader) {
|
|
12
12
|
this.pluginsLoader = pluginsLoader;
|
|
13
13
|
}
|
|
14
|
-
run(configuration, webpackConfigFactoryOrConfig, tsConfigPath, appName, isDebugEnabled = false, watchMode = false, assetsManager, onSuccess) {
|
|
14
|
+
run(configuration, options, webpackConfigFactoryOrConfig, tsConfigPath, appName, isDebugEnabled = false, watchMode = false, assetsManager, onSuccess) {
|
|
15
15
|
const cwd = process.cwd();
|
|
16
16
|
const configPath = (0, path_1.join)(cwd, tsConfigPath);
|
|
17
17
|
if (!(0, fs_1.existsSync)(configPath)) {
|
|
@@ -20,11 +20,11 @@ class WebpackCompiler {
|
|
|
20
20
|
const pluginsConfig = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.plugins', appName);
|
|
21
21
|
const plugins = this.pluginsLoader.load(pluginsConfig);
|
|
22
22
|
const relativeRootPath = (0, path_1.dirname)((0, path_1.relative)(cwd, configPath));
|
|
23
|
-
const sourceRoot = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName);
|
|
23
|
+
const sourceRoot = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName, 'sourceRoot', options);
|
|
24
24
|
const pathToSource = (0, path_1.normalize)(sourceRoot).indexOf((0, path_1.normalize)(relativeRootPath)) >= 0
|
|
25
25
|
? (0, path_1.join)(cwd, sourceRoot)
|
|
26
26
|
: (0, path_1.join)(cwd, relativeRootPath, sourceRoot);
|
|
27
|
-
const entryFile = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName);
|
|
27
|
+
const entryFile = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName, 'entryFile', options);
|
|
28
28
|
const entryFileRoot = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'root', appName) || '';
|
|
29
29
|
const defaultOptions = (0, webpack_defaults_1.webpackDefaultsFactory)(pathToSource, entryFileRoot, entryFile, isDebugEnabled, tsConfigPath, plugins);
|
|
30
30
|
let compiler;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.2",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"tsconfig-paths": "4.2.0",
|
|
59
59
|
"tsconfig-paths-webpack-plugin": "4.0.1",
|
|
60
60
|
"typescript": "4.9.5",
|
|
61
|
-
"webpack": "5.
|
|
61
|
+
"webpack": "5.80.0",
|
|
62
62
|
"webpack-node-externals": "3.0.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
"@commitlint/config-angular": "17.6.1",
|
|
67
67
|
"@types/inquirer": "8.2.6",
|
|
68
68
|
"@types/jest": "29.5.1",
|
|
69
|
-
"@types/node": "18.
|
|
69
|
+
"@types/node": "18.16.0",
|
|
70
70
|
"@types/node-emoji": "1.8.2",
|
|
71
71
|
"@types/shelljs": "0.8.12",
|
|
72
72
|
"@types/webpack-node-externals": "3.0.0",
|
|
73
73
|
"@typescript-eslint/eslint-plugin": "5.59.0",
|
|
74
74
|
"@typescript-eslint/parser": "5.59.0",
|
|
75
75
|
"delete-empty": "3.0.0",
|
|
76
|
-
"eslint": "8.
|
|
76
|
+
"eslint": "8.39.0",
|
|
77
77
|
"eslint-config-prettier": "8.8.0",
|
|
78
78
|
"gulp": "4.0.2",
|
|
79
79
|
"gulp-clean": "0.4.0",
|
|
80
80
|
"husky": "8.0.3",
|
|
81
81
|
"jest": "29.5.0",
|
|
82
82
|
"lint-staged": "13.2.1",
|
|
83
|
-
"prettier": "2.8.
|
|
83
|
+
"prettier": "2.8.8",
|
|
84
84
|
"release-it": "15.10.1",
|
|
85
85
|
"ts-jest": "29.1.0",
|
|
86
86
|
"ts-loader": "9.4.2"
|