@nestjs/cli 8.2.6 → 8.2.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.
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx --no-install commitlint --edit $1
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx lint-staged
package/CONTRIBUTING.md CHANGED
@@ -18,7 +18,7 @@ We would love for you to contribute to Nest and help make it even better than it
18
18
 
19
19
  To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
20
20
 
21
- If you would like to chat about the question in real-time, you can reach out via our [gitter](https://gitter.im/nestjs/nest-cli) channel.
21
+ If you would like to chat about the question in real-time, you can reach out via [our discord channel][discord].
22
22
 
23
23
  ## <a name="issue"></a> Found a Bug?
24
24
 
@@ -217,7 +217,7 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
217
217
  [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
218
218
  [corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
219
219
  [github]: https://github.com/nestjs/nest
220
- [gitter]: https://gitter.im/nestjs/nest
220
+ [discord]: https://discord.gg/nestjs
221
221
  [individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
222
222
  [js-style-guide]: https://google.github.io/styleguide/jsguide.html
223
223
  [jsfiddle]: http://jsfiddle.net
package/README.md CHANGED
@@ -14,6 +14,7 @@
14
14
  <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
15
15
  <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
16
16
  <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
17
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
17
18
  <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
18
19
 
19
20
  ## Description
@@ -1,9 +1,8 @@
1
1
  import { Input } from '../commands';
2
- import { Configuration } from '../lib/configuration';
3
2
  import { BuildAction } from './build.action';
4
3
  export declare class StartAction extends BuildAction {
5
4
  handle(inputs: Input[], options: Input[]): Promise<void>;
6
- createOnSuccessHook(configuration: Required<Configuration>, appName: string, debugFlag: boolean | string | undefined, outDirName: string, binaryToRun?: string): () => void;
5
+ createOnSuccessHook(entryFile: string, sourceRoot: string, debugFlag: boolean | string | undefined, outDirName: string, binaryToRun?: string): () => void;
7
6
  private spawnChildProcess;
8
7
  private isSourceMapSupportPkgAvailable;
9
8
  }
@@ -22,6 +22,7 @@ const ui_1 = require("../lib/ui");
22
22
  const build_action_1 = require("./build.action");
23
23
  class StartAction extends build_action_1.BuildAction {
24
24
  handle(inputs, options) {
25
+ var _a, _b;
25
26
  return __awaiter(this, void 0, void 0, function* () {
26
27
  try {
27
28
  const configFileName = options.find((option) => option.name === 'config')
@@ -40,7 +41,11 @@ class StartAction extends build_action_1.BuildAction {
40
41
  const binaryToRun = binaryToRunOption && binaryToRunOption.value;
41
42
  const { options: tsOptions } = this.tsConfigProvider.getByConfigFilename(pathToTsconfig);
42
43
  const outDir = tsOptions.outDir || defaults_1.defaultOutDir;
43
- const onSuccess = this.createOnSuccessHook(configuration, appName, debugFlag, outDir, binaryToRun);
44
+ const entryFile = ((_a = options.find((option) => option.name === 'entryFile')) === null || _a === void 0 ? void 0 : _a.value) ||
45
+ (0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName, undefined, undefined, defaults_1.defaultConfiguration.entryFile);
46
+ const sourceRoot = ((_b = options.find((option) => option.name === 'sourceRoot')) === null || _b === void 0 ? void 0 : _b.value) ||
47
+ (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName, undefined, undefined, defaults_1.defaultConfiguration.sourceRoot);
48
+ const onSuccess = this.createOnSuccessHook(entryFile, sourceRoot, debugFlag, outDir, binaryToRun);
44
49
  yield this.runBuild(inputs, options, isWatchEnabled, isWatchAssetsEnabled, !!debugFlag, onSuccess);
45
50
  }
46
51
  catch (err) {
@@ -53,9 +58,7 @@ class StartAction extends build_action_1.BuildAction {
53
58
  }
54
59
  });
55
60
  }
56
- createOnSuccessHook(configuration, appName, debugFlag, outDirName, binaryToRun = 'node') {
57
- const sourceRoot = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName);
58
- const entryFile = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName);
61
+ createOnSuccessHook(entryFile, sourceRoot, debugFlag, outDirName, binaryToRun = 'node') {
59
62
  let childProcessRef;
60
63
  process.on('exit', () => childProcessRef && (0, tree_kill_1.treeKillSync)(childProcessRef.pid));
61
64
  return () => {
@@ -23,6 +23,8 @@ class StartCommand extends abstract_command_1.AbstractCommand {
23
23
  .option('--webpack', 'Use webpack for compilation.')
24
24
  .option('--webpackPath [path]', 'Path to webpack configuration.')
25
25
  .option('--tsc', 'Use tsc for compilation.')
26
+ .option('--sourceRoot [sourceRoot]', 'Points at the root of the source code for the single project in standard mode structures, or the default project in monorepo mode structures.')
27
+ .option('--entryFile [entryFile]', "Path to the entry file where this command will work with. Defaults to the one defined at your Nest's CLI config file.")
26
28
  .option('-e, --exec [binary]', 'Binary to run (default: "node").')
27
29
  .option('--preserveWatchOutput', 'Use "preserveWatchOutput" option when tsc watch mode.')
28
30
  .description('Run Nest application.')
@@ -49,6 +51,14 @@ class StartCommand extends abstract_command_1.AbstractCommand {
49
51
  name: 'exec',
50
52
  value: command.exec,
51
53
  });
54
+ options.push({
55
+ name: 'sourceRoot',
56
+ value: command.sourceRoot,
57
+ });
58
+ options.push({
59
+ name: 'entryFile',
60
+ value: command.entryFile,
61
+ });
52
62
  options.push({
53
63
  name: 'preserveWatchOutput',
54
64
  value: !!command.preserveWatchOutput &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "8.2.6",
3
+ "version": "8.2.7",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,7 +26,8 @@
26
26
  "test": "jest --config test/jest-config.json",
27
27
  "test:dev": "npm run clean && jest --config test/jest-config.json --watchAll",
28
28
  "prerelease": "npm run build",
29
- "release": "release-it"
29
+ "release": "release-it",
30
+ "prepare": "husky install"
30
31
  },
31
32
  "repository": {
32
33
  "type": "git",
@@ -43,9 +44,9 @@
43
44
  },
44
45
  "homepage": "https://github.com/nestjs/nest-cli#readme",
45
46
  "dependencies": {
46
- "@angular-devkit/core": "13.3.5",
47
- "@angular-devkit/schematics": "13.3.5",
48
- "@angular-devkit/schematics-cli": "13.3.5",
47
+ "@angular-devkit/core": "14.0.2",
48
+ "@angular-devkit/schematics": "14.0.2",
49
+ "@angular-devkit/schematics-cli": "14.0.2",
49
50
  "@nestjs/schematics": "^8.0.3",
50
51
  "chalk": "3.0.0",
51
52
  "chokidar": "3.5.3",
@@ -62,42 +63,40 @@
62
63
  "tree-kill": "1.2.2",
63
64
  "tsconfig-paths": "3.14.1",
64
65
  "tsconfig-paths-webpack-plugin": "3.5.2",
65
- "typescript": "4.6.4",
66
- "webpack": "5.72.1",
66
+ "typescript": "4.7.4",
67
+ "webpack": "5.73.0",
67
68
  "webpack-node-externals": "3.0.0"
68
69
  },
69
70
  "devDependencies": {
70
- "@commitlint/cli": "16.2.4",
71
- "@commitlint/config-angular": "16.2.4",
71
+ "@commitlint/cli": "17.0.2",
72
+ "@commitlint/config-angular": "17.0.0",
72
73
  "@types/copyfiles": "2.4.1",
73
- "@types/inquirer": "7.3.3",
74
- "@types/jest": "27.5.0",
75
- "@types/node": "16.11.36",
74
+ "@types/inquirer": "8.2.1",
75
+ "@types/jest": "28.1.3",
76
+ "@types/node": "16.11.41",
76
77
  "@types/node-emoji": "1.8.1",
77
78
  "@types/ora": "3.2.0",
78
79
  "@types/os-name": "3.1.0",
79
80
  "@types/rimraf": "3.0.2",
80
81
  "@types/shelljs": "0.8.11",
81
82
  "@types/webpack-node-externals": "2.5.3",
82
- "@typescript-eslint/eslint-plugin": "5.22.0",
83
- "@typescript-eslint/parser": "5.22.0",
83
+ "@typescript-eslint/eslint-plugin": "5.29.0",
84
+ "@typescript-eslint/parser": "5.29.0",
84
85
  "delete-empty": "3.0.0",
85
- "eslint": "8.14.0",
86
+ "eslint": "8.18.0",
86
87
  "eslint-config-prettier": "8.5.0",
87
88
  "eslint-plugin-import": "2.26.0",
88
89
  "gulp": "4.0.2",
89
90
  "gulp-clean": "0.4.0",
90
- "husky": "7.0.4",
91
- "jest": "28.0.3",
92
- "prettier": "2.6.2",
93
- "release-it": "15.0.0",
94
- "ts-jest": "28.0.2",
95
- "ts-loader": "9.3.0",
96
- "ts-node": "10.7.0"
91
+ "husky": "8.0.1",
92
+ "jest": "28.1.1",
93
+ "prettier": "2.7.1",
94
+ "release-it": "15.1.0",
95
+ "ts-jest": "28.0.5",
96
+ "ts-loader": "9.3.1",
97
+ "ts-node": "10.8.1"
97
98
  },
98
- "husky": {
99
- "hooks": {
100
- "commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
101
- }
99
+ "lint-staged": {
100
+ "**/*.{ts,json}": []
102
101
  }
103
102
  }