@nestjs/cli 10.4.5 → 10.4.7
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 +4 -1
- package/.husky/commit-msg +0 -3
- package/.husky/pre-commit +0 -3
- package/actions/generate.action.js +4 -0
- package/lib/compiler/assets-manager.js +4 -1
- package/lib/compiler/defaults/swc-defaults.d.ts +2 -2
- package/lib/compiler/helpers/append-extension.js +1 -2
- package/lib/compiler/helpers/copy-path-resolve.js +1 -2
- package/lib/compiler/helpers/delete-out-dir.js +1 -2
- package/lib/compiler/helpers/get-builder.d.ts +3 -3
- package/lib/compiler/helpers/get-builder.js +1 -2
- package/lib/compiler/helpers/get-tsc-config.path.js +1 -2
- package/lib/compiler/helpers/get-value-or-default.js +2 -3
- package/lib/compiler/helpers/get-webpack-config-path.js +1 -2
- package/lib/compiler/helpers/manual-restart.js +2 -3
- package/lib/compiler/hooks/tsconfig-paths.hook.js +1 -2
- package/lib/configuration/configuration.d.ts +1 -0
- package/lib/questions/questions.d.ts +1 -1
- package/lib/utils/formatting.js +1 -2
- package/lib/utils/get-default-tsconfig-path.js +1 -2
- package/lib/utils/is-module-available.js +1 -2
- package/lib/utils/load-configuration.js +1 -2
- package/lib/utils/local-binaries.js +2 -3
- package/lib/utils/os-info.utils.js +1 -1
- package/lib/utils/project-utils.js +7 -8
- package/lib/utils/remaining-flags.js +1 -2
- package/lib/utils/tree-kill.js +1 -2
- package/package.json +20 -20
- package/lib/compiler/helpers/is-compilable-extension.d.ts +0 -1
- package/lib/compiler/helpers/is-compilable-extension.js +0 -9
- package/lib/compiler/plugins/index.d.ts +0 -1
- package/lib/compiler/plugins/index.js +0 -17
- package/lib/compiler/workspace-utils.d.ts +0 -4
- package/lib/compiler/workspace-utils.js +0 -15
- package/lib/dependency-managers/index.d.ts +0 -1
- package/lib/dependency-managers/index.js +0 -17
- package/lib/dependency-managers/nest.dependency-manager.d.ts +0 -7
- package/lib/dependency-managers/nest.dependency-manager.js +0 -35
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -17
- package/lib/utils/is-error.d.ts +0 -1
- package/lib/utils/is-error.js +0 -11
package/.circleci/config.yml
CHANGED
|
@@ -15,7 +15,7 @@ aliases:
|
|
|
15
15
|
- &run-unit-tests
|
|
16
16
|
run:
|
|
17
17
|
name: Test
|
|
18
|
-
command: npm run test
|
|
18
|
+
command: npm run test -- --runInBand --no-cache
|
|
19
19
|
|
|
20
20
|
jobs:
|
|
21
21
|
build:
|
|
@@ -49,6 +49,9 @@ jobs:
|
|
|
49
49
|
- *restore-cache
|
|
50
50
|
- *install-deps
|
|
51
51
|
- *build-packages
|
|
52
|
+
- run:
|
|
53
|
+
name: Clean build artifacts
|
|
54
|
+
command: npm run clean
|
|
52
55
|
- *run-unit-tests
|
|
53
56
|
|
|
54
57
|
workflows:
|
package/.husky/commit-msg
CHANGED
package/.husky/pre-commit
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GenerateAction = void 0;
|
|
4
4
|
const chalk = require("chalk");
|
|
5
|
+
const path = require("path");
|
|
5
6
|
const get_value_or_default_1 = require("../lib/compiler/helpers/get-value-or-default");
|
|
6
7
|
const schematics_1 = require("../lib/schematics");
|
|
7
8
|
const ui_1 = require("../lib/ui");
|
|
@@ -62,6 +63,9 @@ const generateFiles = async (inputs) => {
|
|
|
62
63
|
generateSpecFileSuffix = (0, project_utils_1.getSpecFileSuffix)(configuration, appName, specFileSuffixValue);
|
|
63
64
|
}
|
|
64
65
|
}
|
|
66
|
+
if (configuration.generateOptions?.baseDir) {
|
|
67
|
+
sourceRoot = path.join(sourceRoot, configuration.generateOptions.baseDir);
|
|
68
|
+
}
|
|
65
69
|
schematicOptions.push(new schematics_1.SchematicOption('sourceRoot', sourceRoot));
|
|
66
70
|
schematicOptions.push(new schematics_1.SchematicOption('spec', generateSpec));
|
|
67
71
|
schematicOptions.push(new schematics_1.SchematicOption('flat', generateFlat));
|
|
@@ -75,7 +75,10 @@ class AssetsManager {
|
|
|
75
75
|
this.watchers.push(watcher);
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
const matchedPaths = (0, glob_1.sync)(item.glob, {
|
|
78
|
+
const matchedPaths = (0, glob_1.sync)(item.glob, {
|
|
79
|
+
ignore: item.exclude,
|
|
80
|
+
dot: true,
|
|
81
|
+
});
|
|
79
82
|
const files = item.glob.endsWith('*')
|
|
80
83
|
? matchedPaths.filter((matched) => (0, fs_1.statSync)(matched).isFile())
|
|
81
84
|
: matchedPaths.flatMap((matched) => {
|
|
@@ -36,7 +36,7 @@ export declare const swcDefaultsFactory: (tsOptions?: ts.CompilerOptions, config
|
|
|
36
36
|
watch: boolean;
|
|
37
37
|
stripLeadingPaths: boolean;
|
|
38
38
|
} | {
|
|
39
|
-
swcrcPath?: string
|
|
39
|
+
swcrcPath?: string;
|
|
40
40
|
outDir: string;
|
|
41
41
|
filenames: string[];
|
|
42
42
|
sync: boolean;
|
|
@@ -47,7 +47,7 @@ export declare const swcDefaultsFactory: (tsOptions?: ts.CompilerOptions, config
|
|
|
47
47
|
watch: boolean;
|
|
48
48
|
stripLeadingPaths: boolean;
|
|
49
49
|
} | {
|
|
50
|
-
configPath?: string
|
|
50
|
+
configPath?: string;
|
|
51
51
|
outDir: string;
|
|
52
52
|
filenames: string[];
|
|
53
53
|
sync: boolean;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.appendTsExtension =
|
|
3
|
+
exports.appendTsExtension = appendTsExtension;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
function appendTsExtension(path) {
|
|
6
6
|
return (0, path_1.extname)(path) === '.ts' ? path : path + '.ts';
|
|
7
7
|
}
|
|
8
|
-
exports.appendTsExtension = appendTsExtension;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.copyPathResolve =
|
|
3
|
+
exports.copyPathResolve = copyPathResolve;
|
|
4
4
|
const path = require("path");
|
|
5
5
|
/**
|
|
6
6
|
* Helper function for returning a copy destination filename
|
|
@@ -11,7 +11,6 @@ const path = require("path");
|
|
|
11
11
|
function copyPathResolve(filePath, outDir, up) {
|
|
12
12
|
return path.join(outDir, dealWith(filePath, up));
|
|
13
13
|
}
|
|
14
|
-
exports.copyPathResolve = copyPathResolve;
|
|
15
14
|
function dealWith(inPath, up) {
|
|
16
15
|
if (!up) {
|
|
17
16
|
return inPath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteOutDirIfEnabled =
|
|
3
|
+
exports.deleteOutDirIfEnabled = deleteOutDirIfEnabled;
|
|
4
4
|
const promises_1 = require("fs/promises");
|
|
5
5
|
const get_value_or_default_1 = require("./get-value-or-default");
|
|
6
6
|
async function deleteOutDirIfEnabled(configuration, appName, dirPath) {
|
|
@@ -10,4 +10,3 @@ async function deleteOutDirIfEnabled(configuration, appName, dirPath) {
|
|
|
10
10
|
}
|
|
11
11
|
await (0, promises_1.rm)(dirPath, { recursive: true, force: true });
|
|
12
12
|
}
|
|
13
|
-
exports.deleteOutDirIfEnabled = deleteOutDirIfEnabled;
|
|
@@ -9,13 +9,13 @@ import { Configuration } from '../../configuration';
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function getBuilder(configuration: Required<Configuration>, cmdOptions: Input[], appName: string): {
|
|
11
11
|
type: "webpack";
|
|
12
|
-
options?: import("../../configuration").WebpackBuilderOptions
|
|
12
|
+
options?: import("../../configuration").WebpackBuilderOptions;
|
|
13
13
|
} | {
|
|
14
14
|
type: "swc";
|
|
15
|
-
options?: import("../../configuration").SwcBuilderOptions
|
|
15
|
+
options?: import("../../configuration").SwcBuilderOptions;
|
|
16
16
|
} | {
|
|
17
17
|
type: "tsc";
|
|
18
|
-
options?: import("../../configuration").TscBuilderOptions
|
|
18
|
+
options?: import("../../configuration").TscBuilderOptions;
|
|
19
19
|
} | {
|
|
20
20
|
type: import("../../configuration").BuilderVariant;
|
|
21
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBuilder =
|
|
3
|
+
exports.getBuilder = getBuilder;
|
|
4
4
|
const get_value_or_default_1 = require("./get-value-or-default");
|
|
5
5
|
/**
|
|
6
6
|
* Returns the builder to use for the given application.
|
|
@@ -17,4 +17,3 @@ function getBuilder(configuration, cmdOptions, appName) {
|
|
|
17
17
|
}
|
|
18
18
|
: builderValue;
|
|
19
19
|
}
|
|
20
|
-
exports.getBuilder = getBuilder;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTscConfigPath =
|
|
3
|
+
exports.getTscConfigPath = getTscConfigPath;
|
|
4
4
|
const get_default_tsconfig_path_1 = require("../../utils/get-default-tsconfig-path");
|
|
5
5
|
const get_value_or_default_1 = require("./get-value-or-default");
|
|
6
6
|
/**
|
|
@@ -22,4 +22,3 @@ function getTscConfigPath(configuration, cmdOptions, appName) {
|
|
|
22
22
|
: undefined;
|
|
23
23
|
return tsconfigPath ?? (0, get_default_tsconfig_path_1.getDefaultTsconfigPath)();
|
|
24
24
|
}
|
|
25
|
-
exports.getTscConfigPath = getTscConfigPath;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getValueOrDefault = getValueOrDefault;
|
|
4
|
+
exports.getValueOfPath = getValueOfPath;
|
|
4
5
|
function getValueOrDefault(configuration, propertyPath, appName, key, options = [], defaultValue) {
|
|
5
6
|
const item = options.find((option) => option.name === key);
|
|
6
7
|
const origValue = item && item.value;
|
|
@@ -22,7 +23,6 @@ function getValueOrDefault(configuration, propertyPath, appName, key, options =
|
|
|
22
23
|
}
|
|
23
24
|
return value;
|
|
24
25
|
}
|
|
25
|
-
exports.getValueOrDefault = getValueOrDefault;
|
|
26
26
|
function getValueOfPath(object, propertyPath) {
|
|
27
27
|
const fragments = propertyPath.split('.');
|
|
28
28
|
let propertyValue = object;
|
|
@@ -61,7 +61,6 @@ function getValueOfPath(object, propertyPath) {
|
|
|
61
61
|
}
|
|
62
62
|
return propertyValue;
|
|
63
63
|
}
|
|
64
|
-
exports.getValueOfPath = getValueOfPath;
|
|
65
64
|
function stripDoubleQuotes(text) {
|
|
66
65
|
return text.replace(/"/g, '');
|
|
67
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWebpackConfigPath =
|
|
3
|
+
exports.getWebpackConfigPath = getWebpackConfigPath;
|
|
4
4
|
const get_value_or_default_1 = require("./get-value-or-default");
|
|
5
5
|
/**
|
|
6
6
|
* Returns the path to the webpack configuration file to use for the given application.
|
|
@@ -21,4 +21,3 @@ function getWebpackConfigPath(configuration, cmdOptions, appName) {
|
|
|
21
21
|
: undefined;
|
|
22
22
|
return webpackPath;
|
|
23
23
|
}
|
|
24
|
-
exports.getWebpackConfigPath = getWebpackConfigPath;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listenForManualRestart = listenForManualRestart;
|
|
4
|
+
exports.displayManualRestartTip = displayManualRestartTip;
|
|
4
5
|
const chalk = require("chalk");
|
|
5
6
|
function listenForManualRestart(callback) {
|
|
6
7
|
const stdinListener = (data) => {
|
|
@@ -11,8 +12,6 @@ function listenForManualRestart(callback) {
|
|
|
11
12
|
};
|
|
12
13
|
process.stdin.on('data', stdinListener);
|
|
13
14
|
}
|
|
14
|
-
exports.listenForManualRestart = listenForManualRestart;
|
|
15
15
|
function displayManualRestartTip() {
|
|
16
16
|
console.log(`To restart at any time, enter ${chalk.gray('rs')}.\n`);
|
|
17
17
|
}
|
|
18
|
-
exports.displayManualRestartTip = displayManualRestartTip;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tsconfigPathsBeforeHookFactory =
|
|
3
|
+
exports.tsconfigPathsBeforeHookFactory = tsconfigPathsBeforeHookFactory;
|
|
4
4
|
const os = require("os");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const typescript_loader_1 = require("../typescript-loader");
|
|
@@ -47,7 +47,6 @@ function tsconfigPathsBeforeHookFactory(compilerOptions) {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
exports.tsconfigPathsBeforeHookFactory = tsconfigPathsBeforeHookFactory;
|
|
51
50
|
function getNotAliasedPath(sf, matcher, text) {
|
|
52
51
|
let result = matcher(text, undefined, undefined, [
|
|
53
52
|
'.ts',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const generateInput: (name: string, message: string) => (defaultAnswer: string) => any;
|
|
2
|
-
export declare const generateSelect: (name: string) => (message: string) => (choices: string[]) => any;
|
|
2
|
+
export declare const generateSelect: (name: string) => ((message: string) => (choices: string[]) => any);
|
package/lib/utils/formatting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizeToKebabOrSnakeCase =
|
|
3
|
+
exports.normalizeToKebabOrSnakeCase = normalizeToKebabOrSnakeCase;
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* @param str
|
|
@@ -16,4 +16,3 @@ function normalizeToKebabOrSnakeCase(str) {
|
|
|
16
16
|
.toLowerCase()
|
|
17
17
|
.replace(STRING_DASHERIZE_REGEXP, '-');
|
|
18
18
|
}
|
|
19
|
-
exports.normalizeToKebabOrSnakeCase = normalizeToKebabOrSnakeCase;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDefaultTsconfigPath =
|
|
3
|
+
exports.getDefaultTsconfigPath = getDefaultTsconfigPath;
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const TSCONFIG_BUILD_JSON = 'tsconfig.build.json';
|
|
@@ -10,4 +10,3 @@ function getDefaultTsconfigPath() {
|
|
|
10
10
|
? TSCONFIG_BUILD_JSON
|
|
11
11
|
: TSCONFIG_JSON;
|
|
12
12
|
}
|
|
13
|
-
exports.getDefaultTsconfigPath = getDefaultTsconfigPath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isModuleAvailable =
|
|
3
|
+
exports.isModuleAvailable = isModuleAvailable;
|
|
4
4
|
function isModuleAvailable(path) {
|
|
5
5
|
try {
|
|
6
6
|
require.resolve(path);
|
|
@@ -10,4 +10,3 @@ function isModuleAvailable(path) {
|
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
exports.isModuleAvailable = isModuleAvailable;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadConfiguration =
|
|
3
|
+
exports.loadConfiguration = loadConfiguration;
|
|
4
4
|
const nest_configuration_loader_1 = require("../configuration/nest-configuration.loader");
|
|
5
5
|
const readers_1 = require("../readers");
|
|
6
6
|
async function loadConfiguration() {
|
|
7
7
|
const loader = new nest_configuration_loader_1.NestConfigurationLoader(new readers_1.FileSystemReader(process.cwd()));
|
|
8
8
|
return loader.load();
|
|
9
9
|
}
|
|
10
|
-
exports.loadConfiguration = loadConfiguration;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.localBinExists = localBinExists;
|
|
4
|
+
exports.loadLocalBinCommandLoader = loadLocalBinCommandLoader;
|
|
4
5
|
const fs_1 = require("fs");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const localBinPathSegments = [process.cwd(), 'node_modules', '@nestjs', 'cli'];
|
|
7
8
|
function localBinExists() {
|
|
8
9
|
return (0, fs_1.existsSync)((0, path_1.join)(...localBinPathSegments));
|
|
9
10
|
}
|
|
10
|
-
exports.localBinExists = localBinExists;
|
|
11
11
|
function loadLocalBinCommandLoader() {
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
13
13
|
const commandsFile = require(path_1.posix.join(...localBinPathSegments, 'commands'));
|
|
14
14
|
return commandsFile.CommandLoader;
|
|
15
15
|
}
|
|
16
|
-
exports.loadLocalBinCommandLoader = loadLocalBinCommandLoader;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = osName;
|
|
3
4
|
function osName(platform, release) {
|
|
4
5
|
switch (platform) {
|
|
5
6
|
case 'darwin':
|
|
@@ -20,4 +21,3 @@ function osName(platform, release) {
|
|
|
20
21
|
return platform;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
exports.default = osName;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.shouldAskForProject = shouldAskForProject;
|
|
4
|
+
exports.shouldGenerateSpec = shouldGenerateSpec;
|
|
5
|
+
exports.shouldGenerateFlat = shouldGenerateFlat;
|
|
6
|
+
exports.getSpecFileSuffix = getSpecFileSuffix;
|
|
7
|
+
exports.askForProjectName = askForProjectName;
|
|
8
|
+
exports.moveDefaultProjectToStart = moveDefaultProjectToStart;
|
|
9
|
+
exports.hasValidOptionFlag = hasValidOptionFlag;
|
|
4
10
|
const inquirer = require("inquirer");
|
|
5
11
|
const get_value_or_default_1 = require("../compiler/helpers/get-value-or-default");
|
|
6
12
|
const questions_1 = require("../questions/questions");
|
|
@@ -10,7 +16,6 @@ function shouldAskForProject(schematic, configurationProjects, appName) {
|
|
|
10
16
|
Object.entries(configurationProjects).length !== 0 &&
|
|
11
17
|
!appName);
|
|
12
18
|
}
|
|
13
|
-
exports.shouldAskForProject = shouldAskForProject;
|
|
14
19
|
function shouldGenerateSpec(configuration, schematic, appName, specValue, specPassedAsInput) {
|
|
15
20
|
if (specPassedAsInput === true || specPassedAsInput === undefined) {
|
|
16
21
|
// CLI parameters has the highest priority
|
|
@@ -38,7 +43,6 @@ function shouldGenerateSpec(configuration, schematic, appName, specValue, specPa
|
|
|
38
43
|
}
|
|
39
44
|
return specValue;
|
|
40
45
|
}
|
|
41
|
-
exports.shouldGenerateSpec = shouldGenerateSpec;
|
|
42
46
|
function shouldGenerateFlat(configuration, appName, flatValue) {
|
|
43
47
|
// CLI parameters have the highest priority
|
|
44
48
|
if (flatValue === true) {
|
|
@@ -50,7 +54,6 @@ function shouldGenerateFlat(configuration, appName, flatValue) {
|
|
|
50
54
|
}
|
|
51
55
|
return flatValue;
|
|
52
56
|
}
|
|
53
|
-
exports.shouldGenerateFlat = shouldGenerateFlat;
|
|
54
57
|
function getSpecFileSuffix(configuration, appName, specFileSuffixValue) {
|
|
55
58
|
// CLI parameters have the highest priority
|
|
56
59
|
if (specFileSuffixValue) {
|
|
@@ -62,7 +65,6 @@ function getSpecFileSuffix(configuration, appName, specFileSuffixValue) {
|
|
|
62
65
|
}
|
|
63
66
|
return specFileSuffixValue;
|
|
64
67
|
}
|
|
65
|
-
exports.getSpecFileSuffix = getSpecFileSuffix;
|
|
66
68
|
async function askForProjectName(promptQuestion, projects) {
|
|
67
69
|
const questions = [
|
|
68
70
|
(0, questions_1.generateSelect)('appName')(promptQuestion)(projects),
|
|
@@ -70,7 +72,6 @@ async function askForProjectName(promptQuestion, projects) {
|
|
|
70
72
|
const prompt = inquirer.createPromptModule();
|
|
71
73
|
return prompt(questions);
|
|
72
74
|
}
|
|
73
|
-
exports.askForProjectName = askForProjectName;
|
|
74
75
|
function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLabel) {
|
|
75
76
|
let projects = configuration.projects != null ? Object.keys(configuration.projects) : [];
|
|
76
77
|
if (configuration.sourceRoot !== 'src') {
|
|
@@ -79,8 +80,6 @@ function moveDefaultProjectToStart(configuration, defaultProjectName, defaultLab
|
|
|
79
80
|
projects.unshift(defaultProjectName);
|
|
80
81
|
return projects;
|
|
81
82
|
}
|
|
82
|
-
exports.moveDefaultProjectToStart = moveDefaultProjectToStart;
|
|
83
83
|
function hasValidOptionFlag(queriedOptionName, options, queriedValue = true) {
|
|
84
84
|
return options.some((option) => option.name === queriedOptionName && option.value === queriedValue);
|
|
85
85
|
}
|
|
86
|
-
exports.hasValidOptionFlag = hasValidOptionFlag;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRemainingFlags =
|
|
3
|
+
exports.getRemainingFlags = getRemainingFlags;
|
|
4
4
|
function getRemainingFlags(cli) {
|
|
5
5
|
const rawArgs = [...cli.rawArgs];
|
|
6
6
|
return rawArgs
|
|
@@ -22,7 +22,6 @@ function getRemainingFlags(cli) {
|
|
|
22
22
|
return true;
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
exports.getRemainingFlags = getRemainingFlags;
|
|
26
25
|
/**
|
|
27
26
|
* Camel-case the given `flag`
|
|
28
27
|
*
|
package/lib/utils/tree-kill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.treeKillSync =
|
|
3
|
+
exports.treeKillSync = treeKillSync;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
5
|
function treeKillSync(pid, signal) {
|
|
6
6
|
if (process.platform === 'win32') {
|
|
@@ -14,7 +14,6 @@ function treeKillSync(pid, signal) {
|
|
|
14
14
|
killPid(pid, signal);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
exports.treeKillSync = treeKillSync;
|
|
18
17
|
function getAllPid() {
|
|
19
18
|
const rows = (0, child_process_1.execSync)('ps -A -o pid,ppid')
|
|
20
19
|
.toString()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/cli",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.7",
|
|
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": "17.3.
|
|
42
|
-
"@angular-devkit/schematics": "17.3.
|
|
43
|
-
"@angular-devkit/schematics-cli": "17.3.
|
|
41
|
+
"@angular-devkit/core": "17.3.11",
|
|
42
|
+
"@angular-devkit/schematics": "17.3.11",
|
|
43
|
+
"@angular-devkit/schematics-cli": "17.3.11",
|
|
44
44
|
"@nestjs/schematics": "^10.0.1",
|
|
45
45
|
"chalk": "4.1.2",
|
|
46
46
|
"chokidar": "3.6.0",
|
|
@@ -54,33 +54,33 @@
|
|
|
54
54
|
"tree-kill": "1.2.2",
|
|
55
55
|
"tsconfig-paths": "4.2.0",
|
|
56
56
|
"tsconfig-paths-webpack-plugin": "4.1.0",
|
|
57
|
-
"typescript": "5.
|
|
58
|
-
"webpack": "5.
|
|
57
|
+
"typescript": "5.6.3",
|
|
58
|
+
"webpack": "5.96.1",
|
|
59
59
|
"webpack-node-externals": "3.0.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@commitlint/cli": "19.
|
|
63
|
-
"@commitlint/config-angular": "19.
|
|
64
|
-
"@swc/cli": "0.
|
|
65
|
-
"@swc/core": "1.
|
|
62
|
+
"@commitlint/cli": "19.5.0",
|
|
63
|
+
"@commitlint/config-angular": "19.5.0",
|
|
64
|
+
"@swc/cli": "0.5.0",
|
|
65
|
+
"@swc/core": "1.8.0",
|
|
66
66
|
"@types/inquirer": "9.0.7",
|
|
67
|
-
"@types/jest": "29.5.
|
|
68
|
-
"@types/node": "
|
|
67
|
+
"@types/jest": "29.5.14",
|
|
68
|
+
"@types/node": "22.8.7",
|
|
69
69
|
"@types/node-emoji": "1.8.2",
|
|
70
70
|
"@types/webpack-node-externals": "3.0.4",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
72
|
-
"@typescript-eslint/parser": "8.
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "8.12.2",
|
|
72
|
+
"@typescript-eslint/parser": "8.12.2",
|
|
73
73
|
"delete-empty": "3.0.0",
|
|
74
|
-
"eslint": "9.
|
|
74
|
+
"eslint": "9.14.0",
|
|
75
75
|
"eslint-config-prettier": "9.1.0",
|
|
76
76
|
"gulp": "5.0.0",
|
|
77
77
|
"gulp-clean": "0.4.0",
|
|
78
|
-
"husky": "9.1.
|
|
78
|
+
"husky": "9.1.6",
|
|
79
79
|
"jest": "29.7.0",
|
|
80
|
-
"lint-staged": "15.2.
|
|
80
|
+
"lint-staged": "15.2.10",
|
|
81
81
|
"prettier": "3.3.3",
|
|
82
|
-
"release-it": "17.
|
|
83
|
-
"ts-jest": "29.2.
|
|
82
|
+
"release-it": "17.10.0",
|
|
83
|
+
"ts-jest": "29.2.5",
|
|
84
84
|
"ts-loader": "9.5.1",
|
|
85
85
|
"ts-node": "10.9.2"
|
|
86
86
|
},
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"**/*.{ts,json}": []
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0",
|
|
91
|
+
"@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0",
|
|
92
92
|
"@swc/core": "^1.3.62"
|
|
93
93
|
},
|
|
94
94
|
"peerDependenciesMeta": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isCompilableExtension(filename: string, allowedExtension: string[]): boolean;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCompilableExtension = void 0;
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
function isCompilableExtension(filename, allowedExtension) {
|
|
6
|
-
const ext = (0, path_1.extname)(filename);
|
|
7
|
-
return allowedExtension.includes(ext);
|
|
8
|
-
}
|
|
9
|
-
exports.isCompilableExtension = isCompilableExtension;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './plugin-metadata-generator';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./plugin-metadata-generator"), exports);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkspaceUtils = void 0;
|
|
4
|
-
const rimraf_1 = require("rimraf");
|
|
5
|
-
const get_value_or_default_1 = require("./helpers/get-value-or-default");
|
|
6
|
-
class WorkspaceUtils {
|
|
7
|
-
async deleteOutDirIfEnabled(configuration, appName, dirPath) {
|
|
8
|
-
const isDeleteEnabled = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.deleteOutDir', appName);
|
|
9
|
-
if (!isDeleteEnabled) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
await (0, rimraf_1.default)(dirPath);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.WorkspaceUtils = WorkspaceUtils;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './nest.dependency-manager';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./nest.dependency-manager"), exports);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AbstractPackageManager } from '../package-managers';
|
|
2
|
-
export declare class NestDependencyManager {
|
|
3
|
-
private packageManager;
|
|
4
|
-
constructor(packageManager: AbstractPackageManager);
|
|
5
|
-
read(): Promise<string[]>;
|
|
6
|
-
update(force: boolean, tag?: string): Promise<void>;
|
|
7
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NestDependencyManager = void 0;
|
|
4
|
-
const ora = require("ora");
|
|
5
|
-
const ui_1 = require("../ui");
|
|
6
|
-
class NestDependencyManager {
|
|
7
|
-
constructor(packageManager) {
|
|
8
|
-
this.packageManager = packageManager;
|
|
9
|
-
}
|
|
10
|
-
async read() {
|
|
11
|
-
const production = await this.packageManager.getProduction();
|
|
12
|
-
return production
|
|
13
|
-
.filter((dependency) => dependency.name.indexOf('@nestjs') > -1)
|
|
14
|
-
.map((dependency) => dependency.name);
|
|
15
|
-
}
|
|
16
|
-
async update(force, tag = 'latest') {
|
|
17
|
-
const spinner = ora({
|
|
18
|
-
spinner: {
|
|
19
|
-
interval: 120,
|
|
20
|
-
frames: ['▹▹▹▹▹', '▸▹▹▹▹', '▹▸▹▹▹', '▹▹▸▹▹', '▹▹▹▸▹', '▹▹▹▹▸'],
|
|
21
|
-
},
|
|
22
|
-
text: ui_1.MESSAGES.PACKAGE_MANAGER_UPDATE_IN_PROGRESS,
|
|
23
|
-
});
|
|
24
|
-
spinner.start();
|
|
25
|
-
const dependencies = await this.read();
|
|
26
|
-
if (force) {
|
|
27
|
-
await this.packageManager.upgradeProduction(dependencies, tag);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
await this.packageManager.updateProduction(dependencies);
|
|
31
|
-
}
|
|
32
|
-
spinner.succeed();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.NestDependencyManager = NestDependencyManager;
|
package/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './compiler/plugins';
|
package/lib/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./compiler/plugins"), exports);
|
package/lib/utils/is-error.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isError(e: Record<string, any> | undefined): any;
|
package/lib/utils/is-error.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isError = void 0;
|
|
4
|
-
function isError(e) {
|
|
5
|
-
return (e &&
|
|
6
|
-
e.stack &&
|
|
7
|
-
e.message &&
|
|
8
|
-
typeof e.stack === 'string' &&
|
|
9
|
-
typeof e.message === 'string');
|
|
10
|
-
}
|
|
11
|
-
exports.isError = isError;
|