@nestjs/cli 7.5.3-next.2 → 7.5.5

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,228 @@
1
+ # Contributing to Nest CLI
2
+
3
+ We would love for you to contribute to Nest and help make it even better than it is today! As a contributor, here are the guidelines we would like you to follow :
4
+
5
+ - [Question or Problem?](#question)
6
+ - [Issues and Bugs](#issue)
7
+ - [Feature Requests](#feature)
8
+ - [Submission Guidelines](#submit)
9
+
10
+ ## <a name="question"></a> Got a Question or Problem ?
11
+
12
+ **Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.** You've got much better chances of getting your question answered on Stack Overflow where the questions should be tagged with tag nestjs.
13
+
14
+ [Stack Overflow](https://stackoverflow.com/questions/tagged/nestjs) is a much better place to ask questions since:
15
+
16
+ - questions and answers stay available for public viewing so your question / answer might help someone else
17
+ - Stack Overflow's voting system assures that the best answers are prominently visible.
18
+
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
+
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.
22
+
23
+ ## <a name="issue"></a> Found a Bug?
24
+
25
+ If you find a bug in the source code, you can help us by
26
+ [submitting an issue](#submit-issue). Even better, you can [submit a Pull Request](#submit-pr) with a fix.
27
+
28
+ ## <a name="feature"></a> Missing a Feature?
29
+
30
+ You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
31
+ Repository. If you would like to _implement_ a new feature, please submit an issue with
32
+ a proposal for your work first, to be sure that we can use it.
33
+ Please consider what kind of change it is:
34
+
35
+ - For a **Major Feature**, first open an issue and outline your proposal so that it can be
36
+ discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
37
+ and help you to craft the change so that it is successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
38
+ - **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
39
+
40
+ ## <a name="submit"></a> Submission Guidelines
41
+
42
+ ### <a name="submit-issue"></a> Submitting an Issue
43
+
44
+ Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.
45
+
46
+ We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using a repository or [Gist](https://gist.github.com/). Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
47
+
48
+ - version of NestJS-CLI used (`nest info`)
49
+ - and most importantly - a use-case that fails
50
+
51
+ Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.
52
+
53
+ You can file new issues by filling out our [new issue form](https://github.com/nestjs/nest/issues/new).
54
+
55
+ ### <a name="submit-pr"></a> Submitting a Pull Request (PR)
56
+
57
+ Before you submit your Pull Request (PR) consider the following guidelines:
58
+
59
+ 1. Search [GitHub](https://github.com/nestjs/nest/pulls) for an open or closed PR that relates to your submission. You don't want to duplicate effort.
60
+ 1. Fork the nestjs/nest-cli repo.
61
+ 1. Get a gpg key to sign your commits, see [help](https://help.github.com/articles/about-gpg/).
62
+ 1. Create your patch, **including appropriate test cases**.
63
+ 1. Commit your changes using a descriptive commit message
64
+
65
+ ```shell
66
+ git commit -am "<message>"
67
+ ```
68
+
69
+ Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
70
+
71
+ 1. Push your branch to GitHub:
72
+
73
+ ```shell
74
+ git push origin my-fix-branch
75
+ ```
76
+
77
+ Note: you can use -u to set your branch in upstream and just push for the next times.
78
+
79
+ 1. In GitHub, send a pull request to `nestjs/nest-cli:master`.
80
+
81
+ - If we suggest changes then:
82
+
83
+ - Make the required updates.
84
+ - Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
85
+
86
+ ```shell
87
+ git rebase master -i
88
+ git push -f
89
+ ```
90
+
91
+ That's it! Thank you for your contribution!
92
+
93
+ #### After your pull request is merged
94
+
95
+ After your pull request is merged, you can safely delete your branch and pull the changes
96
+ from the main (upstream) repository:
97
+
98
+ - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
99
+
100
+ ```shell
101
+ git push origin --delete my-fix-branch
102
+ ```
103
+
104
+ - Check out the master branch:
105
+
106
+ ```shell
107
+ git checkout master -f
108
+ ```
109
+
110
+ - Delete the local branch:
111
+
112
+ ```shell
113
+ git branch -D my-fix-branch
114
+ ```
115
+
116
+ - Update your master with the latest upstream version:
117
+
118
+ ```shell
119
+ git pull --ff upstream master
120
+ ```
121
+
122
+ ## <a name="rules"></a> Coding Rules
123
+ To ensure consistency throughout the source code, keep these rules in mind as you are working:
124
+
125
+ * All features or bug fixes **must be tested** by one or more specs (unit-tests).
126
+ <!--
127
+ // We're working on auto-documentation.
128
+ * All public API methods **must be documented**. (Details TBC). -->
129
+ * We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
130
+ **100 characters**. An automated formatter is available, see
131
+ [DEVELOPER.md](docs/DEVELOPER.md#clang-format).
132
+
133
+ ## <a name="commit"></a> Commit Message Guidelines
134
+
135
+ We have very precise rules over how our git commit messages can be formatted. This leads to **more
136
+ readable messages** that are easy to follow when looking through the **project history**. But also,
137
+ we use the git commit messages to **generate the Nest change log**.
138
+
139
+ ### Commit Message Format
140
+ Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
141
+ format that includes a **type**, a **scope** and a **subject**:
142
+
143
+ ```
144
+ <type>(<scope>): <subject>
145
+ <BLANK LINE>
146
+ <body>
147
+ <BLANK LINE>
148
+ <footer>
149
+ ```
150
+
151
+ The **header** is mandatory and the **scope** of the header is optional.
152
+
153
+ Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
154
+ to read on GitHub as well as in various git tools.
155
+
156
+ Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
157
+
158
+ Samples: (even more [samples](https://github.com/nestjs/nest/commits/master))
159
+
160
+ ```
161
+ docs(changelog) update change log to beta.5
162
+ ```
163
+ ```
164
+ fix(@nestjs/core) need to depend on latest rxjs and zone.js
165
+
166
+ The version in our package.json gets copied to the one we publish, and users need the latest of these.
167
+ ```
168
+
169
+ ### Revert
170
+ If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
171
+
172
+ ### Type
173
+ Must be one of the following:
174
+
175
+ * **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
176
+ * **chore**: Updating tasks etc; no production code change
177
+ * **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
178
+ * **docs**: Documentation only changes
179
+ * **feat**: A new feature
180
+ * **fix**: A bug fix
181
+ * **perf**: A code change that improves performance
182
+ * **refactor**: A code change that neither fixes a bug nor adds a feature
183
+ * **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
184
+ * **test**: Adding missing tests or correcting existing tests
185
+
186
+
187
+ ### Subject
188
+ The subject contains succinct description of the change:
189
+
190
+ * use the imperative, present tense: "change" not "changed" nor "changes"
191
+ * don't capitalize first letter
192
+ * no dot (.) at the end
193
+
194
+ ### Body
195
+ Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
196
+ The body should include the motivation for the change and contrast this with previous behavior.
197
+
198
+ ### Footer
199
+ The footer should contain any information about **Breaking Changes** and is also the place to
200
+ reference GitHub issues that this commit **Closes**.
201
+
202
+ **Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
203
+
204
+ A detailed explanation can be found in this [document][commit-message-format].
205
+
206
+ <!-- ## <a name="cla"></a> Signing the CLA
207
+
208
+ Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
209
+ changes to be accepted, the CLA must be signed. It's a quick process, we promise!
210
+
211
+ * For individuals we have a [simple click-through form][individual-cla].
212
+ * For corporations we'll need you to
213
+ [print, sign and one of scan+email, fax or mail the form][corporate-cla]. -->
214
+
215
+
216
+ <!-- [angular-group]: https://groups.google.com/forum/#!forum/angular -->
217
+ <!-- [coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md -->
218
+ [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
219
+ [corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
220
+ [dev-doc]: https://github.com/nestjs/nest/blob/master/docs/DEVELOPER.md
221
+ [github]: https://github.com/nestjs/nest
222
+ [gitter]: https://gitter.im/nestjs/nest
223
+ [individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
224
+ [js-style-guide]: https://google.github.io/styleguide/jsguide.html
225
+ [jsfiddle]: http://jsfiddle.net
226
+ [plunker]: http://plnkr.co/edit
227
+ [runnable]: http://runnable.com
228
+ <!-- [stackoverflow]: http://stackoverflow.com/questions/tagged/angular -->
package/README.md CHANGED
@@ -38,3 +38,7 @@ Learn more in the [official documentation](https://docs.nestjs.com/cli/overview)
38
38
 
39
39
  - Website - [https://nestjs.com](https://nestjs.com/)
40
40
  - Twitter - [@nestframework](https://twitter.com/nestframework)
41
+
42
+ ## License
43
+
44
+ Nest is [MIT licensed](LICENSE).
@@ -69,7 +69,10 @@ class StartAction extends build_action_1.BuildAction {
69
69
  }
70
70
  else {
71
71
  childProcessRef = this.spawnChildProcess(entryFile, sourceRoot, debugFlag, outDirName, binaryToRun);
72
- childProcessRef.on('exit', () => (childProcessRef = undefined));
72
+ childProcessRef.on('exit', (code) => {
73
+ process.exitCode = code;
74
+ childProcessRef = undefined;
75
+ });
73
76
  }
74
77
  };
75
78
  }
@@ -37,17 +37,21 @@ class NewCommand extends abstract_command_1.AbstractCommand {
37
37
  value: command.packageManager,
38
38
  });
39
39
  if (!!command.language) {
40
- const langMatch = availableLanguages.includes(command.language.toLowerCase());
40
+ const lowercasedLanguage = command.language.toLowerCase();
41
+ const langMatch = availableLanguages.includes(lowercasedLanguage);
41
42
  if (!langMatch) {
42
43
  throw new Error(`Invalid language "${command.language}" selected. Available languages are "typescript" or "javascript"`);
43
44
  }
44
- switch (command.language) {
45
+ switch (lowercasedLanguage) {
45
46
  case 'javascript':
46
47
  command.language = 'js';
47
48
  break;
48
49
  case 'typescript':
49
50
  command.language = 'ts';
50
51
  break;
52
+ default:
53
+ command.language = lowercasedLanguage;
54
+ break;
51
55
  }
52
56
  }
53
57
  options.push({
@@ -46,7 +46,7 @@ function getValueOfPath(object, propertyPath) {
46
46
  continue;
47
47
  }
48
48
  else if (isConcatInProgress && !fragment.endsWith('"')) {
49
- path += '.';
49
+ path += fragment + '.';
50
50
  continue;
51
51
  }
52
52
  else if (fragment.endsWith('"')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/cli",
3
- "version": "7.5.3-next.2",
3
+ "version": "7.5.5",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@cli)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -43,27 +43,27 @@
43
43
  },
44
44
  "homepage": "https://github.com/nestjs/nest-cli#readme",
45
45
  "dependencies": {
46
- "@angular-devkit/core": "11.0.1",
47
- "@angular-devkit/schematics": "11.0.1",
48
- "@angular-devkit/schematics-cli": "0.1100.1",
46
+ "@angular-devkit/core": "11.2.0",
47
+ "@angular-devkit/schematics": "11.2.0",
48
+ "@angular-devkit/schematics-cli": "0.1102.0",
49
49
  "@nestjs/schematics": "^7.1.0",
50
- "@types/webpack": "4.41.25",
50
+ "@types/webpack": "4.41.26",
51
51
  "chalk": "3.0.0",
52
- "chokidar": "3.4.3",
52
+ "chokidar": "3.5.1",
53
53
  "cli-table3": "0.5.1",
54
54
  "commander": "4.1.1",
55
- "fork-ts-checker-webpack-plugin": "6.0.2",
55
+ "fork-ts-checker-webpack-plugin": "6.1.0",
56
56
  "inquirer": "7.3.3",
57
57
  "node-emoji": "1.10.0",
58
- "ora": "5.1.0",
58
+ "ora": "5.3.0",
59
59
  "os-name": "4.0.0",
60
60
  "rimraf": "3.0.2",
61
61
  "shelljs": "0.8.4",
62
62
  "tree-kill": "1.2.2",
63
63
  "tsconfig-paths": "3.9.0",
64
64
  "tsconfig-paths-webpack-plugin": "3.3.0",
65
- "typescript": "4.0.5",
66
- "webpack": "5.4.0",
65
+ "typescript": "4.1.5",
66
+ "webpack": "5.11.0",
67
67
  "webpack-node-externals": "2.5.2"
68
68
  },
69
69
  "devDependencies": {
@@ -71,8 +71,8 @@
71
71
  "@commitlint/config-angular": "11.0.0",
72
72
  "@types/copyfiles": "2.4.0",
73
73
  "@types/inquirer": "7.3.1",
74
- "@types/jest": "26.0.15",
75
- "@types/node": "12.12.31",
74
+ "@types/jest": "26.0.20",
75
+ "@types/node": "12.20.1",
76
76
  "@types/node-emoji": "1.8.1",
77
77
  "@types/ora": "3.1.0",
78
78
  "@types/os-name": "2.0.0",
@@ -82,18 +82,18 @@
82
82
  "@typescript-eslint/eslint-plugin": "^2.19.0",
83
83
  "@typescript-eslint/parser": "^2.19.0",
84
84
  "delete-empty": "3.0.0",
85
- "eslint": "7.12.0",
86
- "eslint-config-prettier": "6.15.0",
85
+ "eslint": "7.20.0",
86
+ "eslint-config-prettier": "7.2.0",
87
87
  "eslint-plugin-import": "2.22.1",
88
88
  "gulp": "4.0.2",
89
89
  "gulp-clean": "0.4.0",
90
- "husky": "4.3.0",
90
+ "husky": "5.0.9",
91
91
  "jest": "26.6.3",
92
- "prettier": "2.1.2",
93
- "release-it": "14.2.1",
94
- "ts-jest": "26.4.4",
95
- "ts-loader": "8.0.11",
96
- "ts-node": "9.0.0"
92
+ "prettier": "2.2.1",
93
+ "release-it": "14.4.0",
94
+ "ts-jest": "26.5.1",
95
+ "ts-loader": "8.0.17",
96
+ "ts-node": "9.1.1"
97
97
  },
98
98
  "husky": {
99
99
  "hooks": {