@nestjs/cli 10.1.18 → 10.2.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.
@@ -21,7 +21,7 @@ jobs:
21
21
  build:
22
22
  working_directory: ~/nest
23
23
  docker:
24
- - image: cimg/node:20.7
24
+ - image: cimg/node:21.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:20.7
46
+ - image: cimg/node:21.0
47
47
  steps:
48
48
  - checkout
49
49
  - *restore-cache
@@ -4,5 +4,5 @@ export declare class StartAction extends BuildAction {
4
4
  handle(commandInputs: Input[], commandOptions: Input[]): Promise<void>;
5
5
  createOnSuccessHook(entryFile: string, sourceRoot: string, debugFlag: boolean | string | undefined, outDirName: string, binaryToRun: string): () => void;
6
6
  private spawnChildProcess;
7
- private isSourceMapSupportPkgAvailable;
7
+ private getSourceMapSupportPkg;
8
8
  }
@@ -78,8 +78,9 @@ class StartAction extends build_action_1.BuildAction {
78
78
  // nest start -- '{"foo": "bar"}'
79
79
  // instead of
80
80
  // nest start -- '\'{"foo": "bar"}\''
81
- childProcessArgs = process.argv.slice(argsStartIndex + 1)
82
- .map(arg => JSON.stringify(arg));
81
+ childProcessArgs = process.argv
82
+ .slice(argsStartIndex + 1)
83
+ .map((arg) => JSON.stringify(arg));
83
84
  }
84
85
  outputFilePath =
85
86
  outputFilePath.indexOf(' ') >= 0 ? `"${outputFilePath}"` : outputFilePath;
@@ -88,21 +89,21 @@ class StartAction extends build_action_1.BuildAction {
88
89
  const inspectFlag = typeof debug === 'string' ? `--inspect=${debug}` : '--inspect';
89
90
  processArgs.unshift(inspectFlag);
90
91
  }
91
- if (this.isSourceMapSupportPkgAvailable()) {
92
- processArgs.unshift('-r source-map-support/register');
92
+ const sourceMapsRegisterPath = this.getSourceMapSupportPkg();
93
+ if (sourceMapsRegisterPath !== undefined) {
94
+ processArgs.unshift(`-r ${sourceMapsRegisterPath}`);
93
95
  }
94
96
  return (0, child_process_1.spawn)(binaryToRun, processArgs, {
95
97
  stdio: 'inherit',
96
98
  shell: true,
97
99
  });
98
100
  }
99
- isSourceMapSupportPkgAvailable() {
101
+ getSourceMapSupportPkg() {
100
102
  try {
101
- require.resolve('source-map-support');
102
- return true;
103
+ return require.resolve('source-map-support/register');
103
104
  }
104
105
  catch {
105
- return false;
106
+ return undefined;
106
107
  }
107
108
  }
108
109
  }
package/bin/nest.js CHANGED
@@ -17,7 +17,7 @@ const bootstrap = async () => {
17
17
  else {
18
18
  await commands_1.CommandLoader.load(program);
19
19
  }
20
- commander.parseAsync(process.argv);
20
+ await commander.parseAsync(process.argv);
21
21
  if (!process.argv.slice(2).length) {
22
22
  program.outputHelp();
23
23
  }
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AssetsManager = void 0;
4
4
  const chokidar = require("chokidar");
5
+ const fs_1 = require("fs");
6
+ const glob_1 = require("glob");
5
7
  const path_1 = require("path");
6
8
  const shell = require("shelljs");
7
9
  const copy_path_resolve_1 = require("./helpers/copy-path-resolve");
@@ -64,13 +66,22 @@ class AssetsManager {
64
66
  sourceRoot,
65
67
  watchAssetsMode: isWatchEnabled,
66
68
  };
67
- // prettier-ignore
68
- const watcher = chokidar
69
- .watch(item.glob, { ignored: item.exclude })
70
- .on('add', (path) => this.actionOnFile({ ...option, path, action: 'change' }))
71
- .on('change', (path) => this.actionOnFile({ ...option, path, action: 'change' }))
72
- .on('unlink', (path) => this.actionOnFile({ ...option, path, action: 'unlink' }));
73
- this.watchers.push(watcher);
69
+ if (isWatchEnabled || item.watchAssets) {
70
+ // prettier-ignore
71
+ const watcher = chokidar
72
+ .watch(item.glob, { ignored: item.exclude })
73
+ .on('add', (path) => this.actionOnFile({ ...option, path, action: 'change' }))
74
+ .on('change', (path) => this.actionOnFile({ ...option, path, action: 'change' }))
75
+ .on('unlink', (path) => this.actionOnFile({ ...option, path, action: 'unlink' }));
76
+ this.watchers.push(watcher);
77
+ }
78
+ else {
79
+ const files = (0, glob_1.sync)(item.glob, { ignore: item.exclude })
80
+ .filter((matched) => (0, fs_1.statSync)(matched).isFile());
81
+ for (const path of files) {
82
+ this.actionOnFile({ ...option, path, action: 'change' });
83
+ }
84
+ }
74
85
  }
75
86
  }
76
87
  catch (err) {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "10.1.18",
3
+ "version": "10.2.0",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "engines": {
9
- "node": ">= 16"
9
+ "node": ">= 16.14"
10
10
  },
11
11
  "bin": {
12
12
  "nest": "bin/nest.js"
@@ -38,15 +38,16 @@
38
38
  },
39
39
  "homepage": "https://github.com/nestjs/nest-cli#readme",
40
40
  "dependencies": {
41
- "@angular-devkit/core": "16.2.3",
42
- "@angular-devkit/schematics": "16.2.3",
43
- "@angular-devkit/schematics-cli": "16.2.3",
41
+ "@angular-devkit/core": "16.2.7",
42
+ "@angular-devkit/schematics": "16.2.7",
43
+ "@angular-devkit/schematics-cli": "16.2.7",
44
44
  "@nestjs/schematics": "^10.0.1",
45
45
  "chalk": "4.1.2",
46
46
  "chokidar": "3.5.3",
47
47
  "cli-table3": "0.6.3",
48
48
  "commander": "4.1.1",
49
- "fork-ts-checker-webpack-plugin": "8.0.0",
49
+ "fork-ts-checker-webpack-plugin": "9.0.0",
50
+ "glob": "10.3.4",
50
51
  "inquirer": "8.2.6",
51
52
  "node-emoji": "1.11.0",
52
53
  "ora": "5.4.1",
@@ -58,34 +59,34 @@
58
59
  "tsconfig-paths": "4.2.0",
59
60
  "tsconfig-paths-webpack-plugin": "4.1.0",
60
61
  "typescript": "5.2.2",
61
- "webpack": "5.88.2",
62
+ "webpack": "5.89.0",
62
63
  "webpack-node-externals": "3.0.0"
63
64
  },
64
65
  "devDependencies": {
65
- "@commitlint/cli": "17.7.1",
66
- "@commitlint/config-angular": "17.7.0",
66
+ "@commitlint/cli": "18.0.0",
67
+ "@commitlint/config-angular": "18.0.0",
67
68
  "@swc/cli": "0.1.62",
68
- "@swc/core": "1.3.86",
69
+ "@swc/core": "1.3.94",
69
70
  "@types/inquirer": "9.0.3",
70
- "@types/jest": "29.5.5",
71
- "@types/node": "18.17.18",
71
+ "@types/jest": "29.5.6",
72
+ "@types/node": "18.18.6",
72
73
  "@types/node-emoji": "1.8.2",
73
- "@types/shelljs": "0.8.12",
74
- "@types/webpack-node-externals": "3.0.1",
75
- "@typescript-eslint/eslint-plugin": "6.7.2",
76
- "@typescript-eslint/parser": "6.7.2",
74
+ "@types/shelljs": "0.8.14",
75
+ "@types/webpack-node-externals": "3.0.3",
76
+ "@typescript-eslint/eslint-plugin": "6.8.0",
77
+ "@typescript-eslint/parser": "6.8.0",
77
78
  "delete-empty": "3.0.0",
78
- "eslint": "8.49.0",
79
+ "eslint": "8.52.0",
79
80
  "eslint-config-prettier": "9.0.0",
80
81
  "gulp": "4.0.2",
81
82
  "gulp-clean": "0.4.0",
82
83
  "husky": "8.0.3",
83
84
  "jest": "29.7.0",
84
- "lint-staged": "14.0.1",
85
+ "lint-staged": "15.0.2",
85
86
  "prettier": "3.0.3",
86
- "release-it": "16.1.5",
87
+ "release-it": "16.2.1",
87
88
  "ts-jest": "29.1.1",
88
- "ts-loader": "9.4.4"
89
+ "ts-loader": "9.5.0"
89
90
  },
90
91
  "lint-staged": {
91
92
  "**/*.{ts,json}": []