@nestjs/cli 11.0.0-next.6 → 11.0.0

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.
@@ -7,7 +7,7 @@ aliases:
7
7
  - &install-deps
8
8
  run:
9
9
  name: Install dependencies
10
- command: npm ci --ignore-scripts --legacy-peer-deps
10
+ command: npm install --ignore-scripts --legacy-peer-deps
11
11
  - &build-packages
12
12
  run:
13
13
  name: Build
@@ -24,14 +24,11 @@ jobs:
24
24
  - image: cimg/node:22.3
25
25
  steps:
26
26
  - checkout
27
- - run:
28
- name: Update NPM version
29
- command: sudo npm install -g npm@latest
30
27
  - restore_cache:
31
28
  key: dependency-cache-{{ checksum "package.json" }}
32
29
  - run:
33
30
  name: Install dependencies
34
- command: npm ci --ignore-scripts --legacy-peer-deps
31
+ command: npm install --ignore-scripts --legacy-peer-deps
35
32
  - save_cache:
36
33
  key: dependency-cache-{{ checksum "package.json" }}
37
34
  paths:
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2023
3
+ Copyright (c) 2017-2025
4
4
  Kamil Mysliwiec <https://kamilmysliwiec.com>
5
5
  Thomas Ricart <thomasr2309@gmail.com>
6
6
 
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddAction = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const get_value_or_default_1 = require("../lib/compiler/helpers/get-value-or-default");
6
6
  const package_managers_1 = require("../lib/package-managers");
7
7
  const schematics_1 = require("../lib/schematics");
@@ -24,7 +24,7 @@ class AddAction extends abstract_action_1.AbstractAction {
24
24
  await this.addLibrary(collectionName, options, extraFlags);
25
25
  }
26
26
  else {
27
- console.error(chalk.red(ui_1.MESSAGES.LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE(libraryName)));
27
+ console.error((0, ansis_1.red)(ui_1.MESSAGES.LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE(libraryName)));
28
28
  throw new Error(ui_1.MESSAGES.LIBRARY_INSTALLATION_FAILED_BAD_PACKAGE(libraryName));
29
29
  }
30
30
  }
@@ -65,7 +65,7 @@ class AddAction extends abstract_action_1.AbstractAction {
65
65
  }
66
66
  catch (error) {
67
67
  if (error && error.message) {
68
- console.error(chalk.red(error.message));
68
+ console.error((0, ansis_1.red)(error.message));
69
69
  }
70
70
  }
71
71
  return installResult;
@@ -81,7 +81,7 @@ class AddAction extends abstract_action_1.AbstractAction {
81
81
  }
82
82
  catch (error) {
83
83
  if (error && error.message) {
84
- console.error(chalk.red(error.message));
84
+ console.error((0, ansis_1.red)(error.message));
85
85
  return Promise.reject();
86
86
  }
87
87
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BuildAction = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const path_1 = require("path");
6
6
  const assets_manager_1 = require("../lib/compiler/assets-manager");
7
7
  const delete_out_dir_1 = require("../lib/compiler/helpers/delete-out-dir");
@@ -41,7 +41,7 @@ class BuildAction extends abstract_action_1.AbstractAction {
41
41
  console.log(`\n${ui_1.ERROR_PREFIX} ${err.message}\n`);
42
42
  }
43
43
  else {
44
- console.error(`\n${chalk.red(err)}\n`);
44
+ console.error(`\n${(0, ansis_1.red)(err)}\n`);
45
45
  }
46
46
  process.exit(1);
47
47
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenerateAction = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const path = require("path");
6
6
  const get_value_or_default_1 = require("../lib/compiler/helpers/get-value-or-default");
7
7
  const schematics_1 = require("../lib/schematics");
@@ -79,7 +79,7 @@ const generateFiles = async (inputs) => {
79
79
  }
80
80
  catch (error) {
81
81
  if (error && error.message) {
82
- console.error(chalk.red(error.message));
82
+ console.error((0, ansis_1.red)(error.message));
83
83
  }
84
84
  }
85
85
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InfoAction = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const fs_1 = require("fs");
6
6
  const os_1 = require("os");
7
7
  const path_1 = require("path");
@@ -31,26 +31,26 @@ class InfoAction extends abstract_action_1.AbstractAction {
31
31
  await this.displayNestInformation();
32
32
  }
33
33
  displayBanner() {
34
- console.info(chalk.red(ui_1.BANNER));
34
+ console.info((0, ansis_1.red)(ui_1.BANNER));
35
35
  }
36
36
  async displaySystemInformation() {
37
- console.info(chalk.green('[System Information]'));
38
- console.info('OS Version :', chalk.blue((0, os_info_utils_1.default)((0, os_1.platform)(), (0, os_1.release)()), (0, os_1.release)()));
39
- console.info('NodeJS Version :', chalk.blue(process.version));
37
+ console.info((0, ansis_1.green) `[System Information]`);
38
+ console.info('OS Version :', (0, ansis_1.blue)((0, os_info_utils_1.default)((0, os_1.platform)(), (0, os_1.release)()) + (0, os_1.release)()));
39
+ console.info('NodeJS Version :', (0, ansis_1.blue)(process.version));
40
40
  await this.displayPackageManagerVersion();
41
41
  }
42
42
  async displayPackageManagerVersion() {
43
43
  try {
44
44
  const version = await this.manager.version();
45
- console.info(`${this.manager.name} Version :`, chalk.blue(version), '\n');
45
+ console.info(`${this.manager.name} Version :`, (0, ansis_1.blue)(version), '\n');
46
46
  }
47
47
  catch {
48
- console.error(`${this.manager.name} Version :`, chalk.red('Unknown'), '\n');
48
+ console.error(`${this.manager.name} Version :`, (0, ansis_1.red) `Unknown`, '\n');
49
49
  }
50
50
  }
51
51
  async displayNestInformation() {
52
52
  this.displayCliVersion();
53
- console.info(chalk.green('[Nest Platform Information]'));
53
+ console.info((0, ansis_1.green) `[Nest Platform Information`);
54
54
  await this.displayNestInformationFromPackage();
55
55
  }
56
56
  async displayNestInformationFromPackage() {
@@ -59,12 +59,12 @@ class InfoAction extends abstract_action_1.AbstractAction {
59
59
  this.displayNestVersions(dependencies);
60
60
  }
61
61
  catch (err) {
62
- console.error(chalk.red(ui_1.MESSAGES.NEST_INFORMATION_PACKAGE_MANAGER_FAILED));
62
+ console.error((0, ansis_1.red)(ui_1.MESSAGES.NEST_INFORMATION_PACKAGE_MANAGER_FAILED));
63
63
  }
64
64
  }
65
65
  displayCliVersion() {
66
- console.info(chalk.green('[Nest CLI]'));
67
- console.info('Nest CLI Version :', chalk.blue(JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../package.json')).toString())
66
+ console.info((0, ansis_1.green) `[Nest CLI]`);
67
+ console.info('Nest CLI Version :', (0, ansis_1.blue)(JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../package.json')).toString())
68
68
  .version), '\n');
69
69
  }
70
70
  readProjectPackageDependencies() {
@@ -80,7 +80,7 @@ class InfoAction extends abstract_action_1.AbstractAction {
80
80
  }
81
81
  displayNestVersions(dependencies) {
82
82
  const nestDependencies = this.buildNestVersionsMessage(dependencies);
83
- nestDependencies.forEach((dependency) => console.info(dependency.name, chalk.blue(dependency.value)));
83
+ nestDependencies.forEach((dependency) => console.info(dependency.name, (0, ansis_1.blue)(dependency.value)));
84
84
  this.displayWarningMessage(nestDependencies);
85
85
  }
86
86
  displayWarningMessage(nestDependencies) {
@@ -89,11 +89,11 @@ class InfoAction extends abstract_action_1.AbstractAction {
89
89
  const majorVersions = Object.keys(warnings);
90
90
  if (majorVersions.length > 0) {
91
91
  console.info('\r');
92
- console.info(chalk.yellow('[Warnings]'));
92
+ console.info((0, ansis_1.yellow) `[Warnings]`);
93
93
  console.info('The following packages are not in the same major version');
94
94
  console.info('This could lead to runtime errors');
95
95
  majorVersions.forEach((version) => {
96
- console.info(chalk.bold(`* Under version ${version}`));
96
+ console.info((0, ansis_1.bold) `* Under version ${version}`);
97
97
  warnings[version].forEach(({ packageName, value }) => {
98
98
  console.info(`- ${packageName} ${value}`);
99
99
  });
@@ -102,7 +102,7 @@ class InfoAction extends abstract_action_1.AbstractAction {
102
102
  }
103
103
  catch {
104
104
  console.info('\t');
105
- console.error(chalk.red(ui_1.MESSAGES.NEST_INFORMATION_PACKAGE_WARNING_FAILED(this.warningMessageDependenciesWhiteList)));
105
+ console.error((0, ansis_1.red)(ui_1.MESSAGES.NEST_INFORMATION_PACKAGE_WARNING_FAILED(this.warningMessageDependenciesWhiteList)));
106
106
  }
107
107
  }
108
108
  buildNestVersionsWarningMessage(nestDependencies) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.exit = exports.retrieveCols = exports.NewAction = void 0;
4
4
  const prompts_1 = require("@inquirer/prompts");
5
- const chalk = require("chalk");
5
+ const ansis = require("ansis");
6
6
  const child_process_1 = require("child_process");
7
7
  const fs = require("fs");
8
8
  const path_1 = require("path");
@@ -90,7 +90,7 @@ const installPackages = async (options, dryRunMode, installDirectory) => {
90
90
  let packageManager;
91
91
  if (dryRunMode) {
92
92
  console.info();
93
- console.info(chalk.green(ui_1.MESSAGES.DRY_RUN_MODE));
93
+ console.info(ansis.green(ui_1.MESSAGES.DRY_RUN_MODE));
94
94
  console.info();
95
95
  return;
96
96
  }
@@ -100,7 +100,7 @@ const installPackages = async (options, dryRunMode, installDirectory) => {
100
100
  }
101
101
  catch (error) {
102
102
  if (error && error.message) {
103
- console.error(chalk.red(error.message));
103
+ console.error(ansis.red(error.message));
104
104
  }
105
105
  }
106
106
  };
@@ -111,7 +111,7 @@ const askForPackageManager = async () => {
111
111
  const initializeGitRepository = async (dir) => {
112
112
  const runner = new git_runner_1.GitRunner();
113
113
  await runner.run('init', true, (0, path_1.join)(process.cwd(), dir)).catch(() => {
114
- console.error(chalk.red(ui_1.MESSAGES.GIT_INITIALIZATION_ERROR));
114
+ console.error(ansis.red(ui_1.MESSAGES.GIT_INITIALIZATION_ERROR));
115
115
  });
116
116
  };
117
117
  /**
@@ -142,7 +142,7 @@ const printCollective = () => {
142
142
  dim('to help us maintain this package.');
143
143
  emptyLine();
144
144
  emptyLine();
145
- print()(`${chalk.bold(`${ui_1.EMOJIS.WINE} Donate:`)} ${chalk.underline('https://opencollective.com/nest')}`);
145
+ print()(`${ansis.bold `${ui_1.EMOJIS.WINE} Donate:`} ${ansis.underline('https://opencollective.com/nest')}`);
146
146
  emptyLine();
147
147
  };
148
148
  const print = (color = null) => (str = '') => {
@@ -151,7 +151,7 @@ const print = (color = null) => (str = '') => {
151
151
  const leftPaddingLength = Math.floor((terminalCols - strLength) / 2);
152
152
  const leftPadding = ' '.repeat(Math.max(leftPaddingLength, 0));
153
153
  if (color) {
154
- str = chalk[color](str);
154
+ str = ansis[color](str);
155
155
  }
156
156
  console.log(leftPadding, str);
157
157
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StartAction = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const child_process_1 = require("child_process");
6
6
  const fs = require("fs");
7
7
  const path_1 = require("path");
@@ -46,7 +46,7 @@ class StartAction extends build_action_1.BuildAction {
46
46
  console.log(`\n${ui_1.ERROR_PREFIX} ${err.message}\n`);
47
47
  }
48
48
  else {
49
- console.error(`\n${chalk.red(err)}\n`);
49
+ console.error(`\n${(0, ansis_1.red)(err)}\n`);
50
50
  }
51
51
  }
52
52
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CommandLoader = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const actions_1 = require("../actions");
6
6
  const ui_1 = require("../lib/ui");
7
7
  const add_command_1 = require("./add.command");
@@ -22,8 +22,8 @@ class CommandLoader {
22
22
  }
23
23
  static handleInvalidCommand(program) {
24
24
  program.on('command:*', () => {
25
- console.error(`\n${ui_1.ERROR_PREFIX} Invalid command: ${chalk.red('%s')}`, program.args.join(' '));
26
- console.log(`See ${chalk.red('--help')} for a list of available commands.\n`);
25
+ console.error(`\n${ui_1.ERROR_PREFIX} Invalid command: ${(0, ansis_1.red) `%s`}`, program.args.join(' '));
26
+ console.log(`See ${(0, ansis_1.red) `--help`} for a list of available commands.\n`);
27
27
  process.exit(1);
28
28
  });
29
29
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GenerateCommand = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const Table = require("cli-table3");
6
6
  const schematics_1 = require("../lib/schematics");
7
7
  const load_configuration_1 = require("../lib/utils/load-configuration");
@@ -68,7 +68,7 @@ class GenerateCommand extends abstract_command_1.AbstractCommand {
68
68
  async buildDescription() {
69
69
  const collection = await this.getCollection();
70
70
  return ('Generate a Nest element.\n' +
71
- ` Schematics available on ${chalk.bold(collection)} collection:\n` +
71
+ ` Schematics available on ${(0, ansis_1.bold)(collection)} collection:\n` +
72
72
  this.buildSchematicsListAsTable(await this.getSchematics(collection)));
73
73
  }
74
74
  buildSchematicsListAsTable(schematics) {
@@ -88,8 +88,8 @@ class GenerateCommand extends abstract_command_1.AbstractCommand {
88
88
  const table = new Table(tableConfig);
89
89
  for (const schematic of schematics) {
90
90
  table.push([
91
- chalk.green(schematic.name),
92
- chalk.cyan(schematic.alias),
91
+ (0, ansis_1.green)(schematic.name),
92
+ (0, ansis_1.cyan)(schematic.alias),
93
93
  schematic.description,
94
94
  ]);
95
95
  }
@@ -66,6 +66,7 @@ const webpackDefaultsFactory = (sourceRoot, relativeSourceRoot, entryFilename, i
66
66
  '@nestjs/websockets/socket-module',
67
67
  'class-validator',
68
68
  'class-transformer',
69
+ 'class-transformer/storage',
69
70
  ];
70
71
  if (!lazyImports.includes(resource)) {
71
72
  return false;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.listenForManualRestart = listenForManualRestart;
4
4
  exports.displayManualRestartTip = displayManualRestartTip;
5
- const chalk = require("chalk");
5
+ const ansis_1 = require("ansis");
6
6
  function listenForManualRestart(callback) {
7
7
  const stdinListener = (data) => {
8
8
  if (data.toString().trim() === 'rs') {
@@ -13,5 +13,5 @@ function listenForManualRestart(callback) {
13
13
  process.stdin.on('data', stdinListener);
14
14
  }
15
15
  function displayManualRestartTip() {
16
- console.log(`To restart at any time, enter ${chalk.gray('rs')}.\n`);
16
+ console.log(`To restart at any time, enter ${(0, ansis_1.gray) `rs`}.\n`);
17
17
  }
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FOUND_NO_ISSUES_GENERATING_METADATA = exports.FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED = exports.INITIALIZING_TYPE_CHECKER = exports.TSC_LOG_SUCCESS_PREFIX = exports.TSC_LOG_ERROR_PREFIX = exports.TSC_LOG_PREFIX = exports.SWC_LOG_PREFIX = exports.TSC_COMPILATION_STARTED_MESSAGE = exports.TSC_NO_ERRORS_MESSAGE = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  exports.TSC_NO_ERRORS_MESSAGE = 'Found 0 errors. Watching for file changes.';
6
6
  exports.TSC_COMPILATION_STARTED_MESSAGE = 'Starting compilation in watch mode...';
7
- exports.SWC_LOG_PREFIX = chalk.cyan('> ') + chalk.bgCyan.bold(' SWC ');
8
- exports.TSC_LOG_PREFIX = chalk.cyan('> ') + chalk.bgCyan.bold(' TSC ');
9
- exports.TSC_LOG_ERROR_PREFIX = chalk.red('> ') + chalk.bgRed.bold(' TSC ');
10
- exports.TSC_LOG_SUCCESS_PREFIX = chalk.green('> ') + chalk.bgGreen.bold(' TSC ');
11
- exports.INITIALIZING_TYPE_CHECKER = chalk.bgCyan.bold(' TSC ') + chalk.cyan(' Initializing type checker...');
12
- exports.FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED = exports.TSC_LOG_SUCCESS_PREFIX + chalk.green(' Found 0 issues.');
13
- exports.FOUND_NO_ISSUES_GENERATING_METADATA = exports.TSC_LOG_SUCCESS_PREFIX +
14
- chalk.green(' Found 0 issues. Generating metadata...');
7
+ exports.SWC_LOG_PREFIX = (0, ansis_1.cyan)('> ') + ansis_1.bgCyan.bold(' SWC ');
8
+ exports.TSC_LOG_PREFIX = (0, ansis_1.cyan)('> ') + ansis_1.bgCyan.bold(' TSC ');
9
+ exports.TSC_LOG_ERROR_PREFIX = (0, ansis_1.red)('> ') + ansis_1.bgRed.bold(' TSC ');
10
+ exports.TSC_LOG_SUCCESS_PREFIX = (0, ansis_1.green)('> ') + ansis_1.bgGreen.bold(' TSC ');
11
+ exports.INITIALIZING_TYPE_CHECKER = ansis_1.bgCyan.bold(' TSC ') + (0, ansis_1.cyan)(' Initializing type checker...');
12
+ exports.FOUND_NO_ISSUES_METADATA_GENERATION_SKIPPED = exports.TSC_LOG_SUCCESS_PREFIX + (0, ansis_1.green)(' Found 0 issues.');
13
+ exports.FOUND_NO_ISSUES_GENERATING_METADATA = exports.TSC_LOG_SUCCESS_PREFIX + (0, ansis_1.green)(' Found 0 issues. Generating metadata...');
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SwcCompiler = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const child_process_1 = require("child_process");
6
6
  const chokidar = require("chokidar");
7
7
  const fs_1 = require("fs");
@@ -97,7 +97,7 @@ class SwcCompiler extends base_compiler_1.BaseCompiler {
97
97
  }
98
98
  }
99
99
  async runSwc(options, extras, swcrcFilePath) {
100
- process.nextTick(() => console.log(constants_1.SWC_LOG_PREFIX, chalk.cyan('Running...')));
100
+ process.nextTick(() => console.log(constants_1.SWC_LOG_PREFIX, (0, ansis_1.cyan)('Running...')));
101
101
  const swcCli = this.loadSwcCliBinary();
102
102
  const swcRcFile = await this.getSwcRcFileContentIfExists(swcrcFilePath);
103
103
  const swcOptions = this.deepMerge(options.swcOptions, swcRcFile);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TypeCheckerHost = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const ora = require("ora");
6
6
  const ts = require("typescript");
7
7
  const tsconfig_provider_1 = require("../helpers/tsconfig-provider");
@@ -37,7 +37,7 @@ class TypeCheckerHost {
37
37
  const reportWatchStatusCallback = (diagnostic) => {
38
38
  if (diagnostic.messageText !== constants_1.TSC_NO_ERRORS_MESSAGE) {
39
39
  if (diagnostic.messageText?.includes('Found')) {
40
- console.log(constants_1.TSC_LOG_ERROR_PREFIX, chalk.red(diagnostic.messageText));
40
+ console.log(constants_1.TSC_LOG_ERROR_PREFIX, (0, ansis_1.red)(diagnostic.messageText.toString()));
41
41
  }
42
42
  return;
43
43
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractPackageManager = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const fs_1 = require("fs");
6
6
  const ora = require("ora");
7
7
  const path_1 = require("path");
@@ -30,15 +30,15 @@ class AbstractPackageManager {
30
30
  console.info(ui_1.MESSAGES.PACKAGE_MANAGER_INSTALLATION_SUCCEED(directory));
31
31
  console.info(ui_1.MESSAGES.GET_STARTED_INFORMATION);
32
32
  console.info();
33
- console.info(chalk.gray(ui_1.MESSAGES.CHANGE_DIR_COMMAND(directory)));
34
- console.info(chalk.gray(ui_1.MESSAGES.START_COMMAND(packageManager)));
33
+ console.info((0, ansis_1.gray)(ui_1.MESSAGES.CHANGE_DIR_COMMAND(directory)));
34
+ console.info((0, ansis_1.gray)(ui_1.MESSAGES.START_COMMAND(packageManager)));
35
35
  console.info();
36
36
  }
37
37
  catch {
38
38
  spinner.fail();
39
39
  const commandArgs = this.cli.install;
40
40
  const commandToRun = this.runner.rawFullCommand(commandArgs);
41
- console.error(chalk.red(ui_1.MESSAGES.PACKAGE_MANAGER_INSTALLATION_FAILED(chalk.bold(commandToRun))));
41
+ console.error((0, ansis_1.red)(ui_1.MESSAGES.PACKAGE_MANAGER_INSTALLATION_FAILED((0, ansis_1.bold)(commandToRun))));
42
42
  }
43
43
  }
44
44
  async version() {
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractRunner = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const child_process_1 = require("child_process");
6
6
  const ui_1 = require("../ui");
7
7
  class AbstractRunner {
@@ -26,7 +26,7 @@ class AbstractRunner {
26
26
  resolve(null);
27
27
  }
28
28
  else {
29
- console.error(chalk.red(ui_1.MESSAGES.RUNNER_EXECUTION_ERROR(`${this.binary} ${command}`)));
29
+ console.error((0, ansis_1.red)(ui_1.MESSAGES.RUNNER_EXECUTION_ERROR(`${this.binary} ${command}`)));
30
30
  reject();
31
31
  }
32
32
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RunnerFactory = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const npm_runner_1 = require("./npm.runner");
6
6
  const runner_1 = require("./runner");
7
7
  const schematic_runner_1 = require("./schematic.runner");
@@ -19,7 +19,7 @@ class RunnerFactory {
19
19
  case runner_1.Runner.PNPM:
20
20
  return new pnpm_runner_1.PnpmRunner();
21
21
  default:
22
- console.info(chalk.yellow(`[WARN] Unsupported runner: ${runner}`));
22
+ console.info((0, ansis_1.yellow) `[WARN] Unsupported runner: ${runner}`);
23
23
  }
24
24
  }
25
25
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MESSAGES = void 0;
4
- const chalk = require("chalk");
4
+ const ansis_1 = require("ansis");
5
5
  const emojis_1 = require("./emojis");
6
6
  exports.MESSAGES = {
7
7
  PROJECT_NAME_QUESTION: 'What name would you like to use for the new project?',
@@ -17,7 +17,7 @@ exports.MESSAGES = {
17
17
  PACKAGE_MANAGER_PRODUCTION_INSTALLATION_IN_PROGRESS: `Package installation in progress... ${emojis_1.EMOJIS.COFFEE}`,
18
18
  GIT_INITIALIZATION_ERROR: 'Git repository has not been initialized',
19
19
  PACKAGE_MANAGER_INSTALLATION_SUCCEED: (name) => name !== '.'
20
- ? `${emojis_1.EMOJIS.ROCKET} Successfully created project ${chalk.green(name)}`
20
+ ? `${emojis_1.EMOJIS.ROCKET} Successfully created project ${(0, ansis_1.green)(name)}`
21
21
  : `${emojis_1.EMOJIS.ROCKET} Successfully created a new project`,
22
22
  GET_STARTED_INFORMATION: `${emojis_1.EMOJIS.POINT_RIGHT} Get started with the following commands:`,
23
23
  CHANGE_DIR_COMMAND: (name) => `$ cd ${name}`,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.INFO_PREFIX = exports.ERROR_PREFIX = void 0;
4
- const chalk = require("chalk");
5
- exports.ERROR_PREFIX = chalk.bgRgb(210, 0, 75).bold.rgb(0, 0, 0)(' Error ');
6
- exports.INFO_PREFIX = chalk.bgRgb(60, 190, 100).bold.rgb(0, 0, 0)(' Info ');
4
+ const ansis_1 = require("ansis");
5
+ exports.ERROR_PREFIX = (0, ansis_1.bgRgb)(210, 0, 75).bold.rgb(0, 0, 0)(' Error ');
6
+ exports.INFO_PREFIX = (0, ansis_1.bgRgb)(60, 190, 100).bold.rgb(0, 0, 0)(' Info ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "11.0.0-next.6",
3
+ "version": "11.0.0",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,7 +26,7 @@
26
26
  "test:dev": "npm run clean && jest --config test/jest-config.json --watchAll",
27
27
  "prerelease": "npm run build",
28
28
  "release": "release-it",
29
- "prepare": "husky install"
29
+ "prepare": "husky"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",
@@ -38,57 +38,57 @@
38
38
  },
39
39
  "homepage": "https://github.com/nestjs/nest-cli#readme",
40
40
  "dependencies": {
41
- "@angular-devkit/core": "19.0.1",
42
- "@angular-devkit/schematics": "19.0.1",
43
- "@angular-devkit/schematics-cli": "19.0.1",
44
- "@inquirer/prompts": "5.3.8",
45
- "@nestjs/schematics": "next",
46
- "chalk": "4.1.2",
47
- "chokidar": "4.0.1",
41
+ "@angular-devkit/core": "19.1.2",
42
+ "@angular-devkit/schematics": "19.1.2",
43
+ "@angular-devkit/schematics-cli": "19.1.2",
44
+ "@inquirer/prompts": "7.2.3",
45
+ "@nestjs/schematics": "11.0.0",
46
+ "ansis": "3.9.0",
47
+ "chokidar": "4.0.3",
48
48
  "cli-table3": "0.6.5",
49
49
  "commander": "4.1.1",
50
50
  "fork-ts-checker-webpack-plugin": "9.0.2",
51
- "glob": "11.0.0",
51
+ "glob": "11.0.1",
52
52
  "node-emoji": "1.11.0",
53
53
  "ora": "5.4.1",
54
54
  "tree-kill": "1.2.2",
55
55
  "tsconfig-paths": "4.2.0",
56
56
  "tsconfig-paths-webpack-plugin": "4.2.0",
57
- "typescript": "5.6.3",
58
- "webpack": "5.96.1",
57
+ "typescript": "5.7.3",
58
+ "webpack": "5.97.1",
59
59
  "webpack-node-externals": "3.0.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@commitlint/cli": "19.6.0",
63
- "@commitlint/config-angular": "19.6.0",
64
- "@swc/cli": "0.5.1",
65
- "@swc/core": "1.9.3",
62
+ "@commitlint/cli": "19.6.1",
63
+ "@commitlint/config-angular": "19.7.0",
64
+ "@swc/cli": "0.6.0",
65
+ "@swc/core": "1.10.8",
66
66
  "@types/inquirer": "9.0.7",
67
67
  "@types/jest": "29.5.14",
68
- "@types/node": "22.9.1",
68
+ "@types/node": "22.10.7",
69
69
  "@types/node-emoji": "1.8.2",
70
70
  "@types/webpack-node-externals": "3.0.4",
71
- "@typescript-eslint/eslint-plugin": "8.15.0",
72
- "@typescript-eslint/parser": "8.15.0",
71
+ "@typescript-eslint/eslint-plugin": "8.20.0",
72
+ "@typescript-eslint/parser": "8.20.0",
73
73
  "delete-empty": "3.0.0",
74
- "eslint": "9.15.0",
75
- "eslint-config-prettier": "9.1.0",
74
+ "eslint": "9.18.0",
75
+ "eslint-config-prettier": "10.0.1",
76
76
  "gulp": "5.0.0",
77
77
  "gulp-clean": "0.4.0",
78
78
  "husky": "9.1.7",
79
79
  "jest": "29.7.0",
80
- "lint-staged": "15.2.10",
81
- "prettier": "3.3.3",
82
- "release-it": "17.10.0",
80
+ "lint-staged": "15.4.1",
81
+ "prettier": "3.4.2",
82
+ "release-it": "18.1.1",
83
83
  "ts-jest": "29.2.5",
84
- "ts-loader": "9.5.1",
84
+ "ts-loader": "9.5.2",
85
85
  "ts-node": "10.9.2"
86
86
  },
87
87
  "lint-staged": {
88
88
  "**/*.{ts,json}": []
89
89
  },
90
90
  "peerDependencies": {
91
- "@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0",
91
+ "@swc/cli": "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0",
92
92
  "@swc/core": "^1.3.62"
93
93
  },
94
94
  "peerDependenciesMeta": {