@nestjs/cli 10.1.16 → 10.1.18
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:20.
|
|
24
|
+
- image: cimg/node:20.7
|
|
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:20.
|
|
46
|
+
- image: cimg/node:20.7
|
|
47
47
|
steps:
|
|
48
48
|
- checkout
|
|
49
49
|
- *restore-cache
|
package/actions/start.action.js
CHANGED
|
@@ -73,7 +73,13 @@ class StartAction extends build_action_1.BuildAction {
|
|
|
73
73
|
let childProcessArgs = [];
|
|
74
74
|
const argsStartIndex = process.argv.indexOf('--');
|
|
75
75
|
if (argsStartIndex >= 0) {
|
|
76
|
-
|
|
76
|
+
// Prevents the need for users to double escape strings
|
|
77
|
+
// i.e. I can run the more natural
|
|
78
|
+
// nest start -- '{"foo": "bar"}'
|
|
79
|
+
// instead of
|
|
80
|
+
// nest start -- '\'{"foo": "bar"}\''
|
|
81
|
+
childProcessArgs = process.argv.slice(argsStartIndex + 1)
|
|
82
|
+
.map(arg => JSON.stringify(arg));
|
|
77
83
|
}
|
|
78
84
|
outputFilePath =
|
|
79
85
|
outputFilePath.indexOf(' ') >= 0 ? `"${outputFilePath}"` : outputFilePath;
|
|
@@ -6,8 +6,6 @@ export declare const swcDefaultsFactory: (tsOptions?: ts.CompilerOptions, config
|
|
|
6
6
|
type: string;
|
|
7
7
|
};
|
|
8
8
|
jsc: {
|
|
9
|
-
baseUrl?: undefined;
|
|
10
|
-
paths?: undefined;
|
|
11
9
|
target: string;
|
|
12
10
|
parser: {
|
|
13
11
|
syntax: string;
|
|
@@ -20,21 +18,8 @@ export declare const swcDefaultsFactory: (tsOptions?: ts.CompilerOptions, config
|
|
|
20
18
|
useDefineForClassFields: boolean;
|
|
21
19
|
};
|
|
22
20
|
keepClassNames: boolean;
|
|
23
|
-
} | {
|
|
24
21
|
baseUrl: string | undefined;
|
|
25
22
|
paths: ts.MapLike<string[]> | undefined;
|
|
26
|
-
target: string;
|
|
27
|
-
parser: {
|
|
28
|
-
syntax: string;
|
|
29
|
-
decorators: boolean;
|
|
30
|
-
dynamicImport: boolean;
|
|
31
|
-
};
|
|
32
|
-
transform: {
|
|
33
|
-
legacyDecorator: boolean;
|
|
34
|
-
decoratorMetadata: boolean;
|
|
35
|
-
useDefineForClassFields: boolean;
|
|
36
|
-
};
|
|
37
|
-
keepClassNames: boolean;
|
|
38
23
|
};
|
|
39
24
|
minify: boolean;
|
|
40
25
|
swcrc: boolean;
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.swcDefaultsFactory = void 0;
|
|
4
|
-
const process_1 = require("process");
|
|
5
4
|
const swcDefaultsFactory = (tsOptions, configuration) => {
|
|
6
5
|
const builderOptions = typeof configuration?.compilerOptions?.builder !== 'string'
|
|
7
6
|
? configuration?.compilerOptions?.builder?.options
|
|
8
7
|
: {};
|
|
9
|
-
// swc does not currently support paths mapping on Windows
|
|
10
|
-
// see https://github.com/nestjs/nest-cli/issues/2211
|
|
11
|
-
const pathsMappingOptions = process_1.platform?.startsWith('win')
|
|
12
|
-
? {}
|
|
13
|
-
: {
|
|
14
|
-
baseUrl: tsOptions?.baseUrl,
|
|
15
|
-
paths: tsOptions?.paths,
|
|
16
|
-
};
|
|
17
8
|
return {
|
|
18
9
|
swcOptions: {
|
|
19
10
|
module: {
|
|
@@ -32,7 +23,8 @@ const swcDefaultsFactory = (tsOptions, configuration) => {
|
|
|
32
23
|
useDefineForClassFields: false,
|
|
33
24
|
},
|
|
34
25
|
keepClassNames: true,
|
|
35
|
-
|
|
26
|
+
baseUrl: tsOptions?.baseUrl,
|
|
27
|
+
paths: tsOptions?.paths,
|
|
36
28
|
},
|
|
37
29
|
minify: false,
|
|
38
30
|
swcrc: true,
|
|
@@ -2,11 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NestConfigurationLoader = void 0;
|
|
4
4
|
const defaults_1 = require("./defaults");
|
|
5
|
+
/**
|
|
6
|
+
* A cache table that maps some reader (by its name along with the config path)
|
|
7
|
+
* to a loaded configuration.
|
|
8
|
+
* This was added because several commands relies on the app's config in order
|
|
9
|
+
* to generate some dynanmic content prior running the command itself.
|
|
10
|
+
*/
|
|
11
|
+
const loadedConfigsCache = new Map();
|
|
5
12
|
class NestConfigurationLoader {
|
|
6
13
|
constructor(reader) {
|
|
7
14
|
this.reader = reader;
|
|
8
15
|
}
|
|
9
16
|
async load(name) {
|
|
17
|
+
const cacheEntryKey = `${this.reader.constructor.name}:${name}`;
|
|
18
|
+
const cachedConfig = loadedConfigsCache.get(cacheEntryKey);
|
|
19
|
+
if (cachedConfig) {
|
|
20
|
+
return cachedConfig;
|
|
21
|
+
}
|
|
22
|
+
let loadedConfig;
|
|
10
23
|
const content = name
|
|
11
24
|
? await this.reader.read(name)
|
|
12
25
|
: await this.reader.readAnyOf([
|
|
@@ -15,24 +28,30 @@ class NestConfigurationLoader {
|
|
|
15
28
|
'.nest-cli.json',
|
|
16
29
|
'nest.json',
|
|
17
30
|
]);
|
|
18
|
-
if (
|
|
19
|
-
|
|
31
|
+
if (content) {
|
|
32
|
+
const fileConfig = JSON.parse(content);
|
|
33
|
+
if (fileConfig.compilerOptions) {
|
|
34
|
+
loadedConfig = {
|
|
35
|
+
...defaults_1.defaultConfiguration,
|
|
36
|
+
...fileConfig,
|
|
37
|
+
compilerOptions: {
|
|
38
|
+
...defaults_1.defaultConfiguration.compilerOptions,
|
|
39
|
+
...fileConfig.compilerOptions,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
loadedConfig = {
|
|
45
|
+
...defaults_1.defaultConfiguration,
|
|
46
|
+
...fileConfig,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
20
49
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
...defaults_1.defaultConfiguration,
|
|
25
|
-
...fileConfig,
|
|
26
|
-
compilerOptions: {
|
|
27
|
-
...defaults_1.defaultConfiguration.compilerOptions,
|
|
28
|
-
...fileConfig.compilerOptions,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
50
|
+
else {
|
|
51
|
+
loadedConfig = defaults_1.defaultConfiguration;
|
|
31
52
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
...fileConfig,
|
|
35
|
-
};
|
|
53
|
+
loadedConfigsCache.set(cacheEntryKey, loadedConfig);
|
|
54
|
+
return loadedConfig;
|
|
36
55
|
}
|
|
37
56
|
}
|
|
38
57
|
exports.NestConfigurationLoader = NestConfigurationLoader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.18",
|
|
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.2.
|
|
42
|
-
"@angular-devkit/schematics": "16.2.
|
|
43
|
-
"@angular-devkit/schematics-cli": "16.2.
|
|
41
|
+
"@angular-devkit/core": "16.2.3",
|
|
42
|
+
"@angular-devkit/schematics": "16.2.3",
|
|
43
|
+
"@angular-devkit/schematics-cli": "16.2.3",
|
|
44
44
|
"@nestjs/schematics": "^10.0.1",
|
|
45
45
|
"chalk": "4.1.2",
|
|
46
46
|
"chokidar": "3.5.3",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tree-kill": "1.2.2",
|
|
58
58
|
"tsconfig-paths": "4.2.0",
|
|
59
59
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
60
|
-
"typescript": "5.
|
|
60
|
+
"typescript": "5.2.2",
|
|
61
61
|
"webpack": "5.88.2",
|
|
62
62
|
"webpack-node-externals": "3.0.0"
|
|
63
63
|
},
|
|
@@ -65,24 +65,24 @@
|
|
|
65
65
|
"@commitlint/cli": "17.7.1",
|
|
66
66
|
"@commitlint/config-angular": "17.7.0",
|
|
67
67
|
"@swc/cli": "0.1.62",
|
|
68
|
-
"@swc/core": "1.3.
|
|
68
|
+
"@swc/core": "1.3.86",
|
|
69
69
|
"@types/inquirer": "9.0.3",
|
|
70
|
-
"@types/jest": "29.5.
|
|
71
|
-
"@types/node": "18.17.
|
|
70
|
+
"@types/jest": "29.5.5",
|
|
71
|
+
"@types/node": "18.17.18",
|
|
72
72
|
"@types/node-emoji": "1.8.2",
|
|
73
73
|
"@types/shelljs": "0.8.12",
|
|
74
|
-
"@types/webpack-node-externals": "3.0.
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
76
|
-
"@typescript-eslint/parser": "6.
|
|
74
|
+
"@types/webpack-node-externals": "3.0.1",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "6.7.2",
|
|
76
|
+
"@typescript-eslint/parser": "6.7.2",
|
|
77
77
|
"delete-empty": "3.0.0",
|
|
78
|
-
"eslint": "8.
|
|
78
|
+
"eslint": "8.49.0",
|
|
79
79
|
"eslint-config-prettier": "9.0.0",
|
|
80
80
|
"gulp": "4.0.2",
|
|
81
81
|
"gulp-clean": "0.4.0",
|
|
82
82
|
"husky": "8.0.3",
|
|
83
|
-
"jest": "29.
|
|
83
|
+
"jest": "29.7.0",
|
|
84
84
|
"lint-staged": "14.0.1",
|
|
85
|
-
"prettier": "3.0.
|
|
85
|
+
"prettier": "3.0.3",
|
|
86
86
|
"release-it": "16.1.5",
|
|
87
87
|
"ts-jest": "29.1.1",
|
|
88
88
|
"ts-loader": "9.4.4"
|