create-packer 1.24.14 → 1.24.16
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/LICENSE +21 -21
- package/package.json +1 -1
- package/template/lib/ts/package.json +4 -5
- package/template/nest/.eslintrc.js +25 -25
- package/template/nest/.gitignore +34 -34
- package/template/nest/.husky/pre-commit +4 -4
- package/template/nest/.prettierrc +6 -6
- package/template/nest/README.md +73 -73
- package/template/nest/nest-cli.json +5 -5
- package/template/nest/src/app.controller.spec.ts +22 -22
- package/template/nest/src/app.controller.ts +12 -12
- package/template/nest/src/app.module.ts +10 -10
- package/template/nest/src/app.service.ts +8 -8
- package/template/nest/src/main.ts +10 -10
- package/template/nest/src/utils/transform.interceptor.ts +26 -26
- package/template/nest/test/app.e2e-spec.ts +24 -24
- package/template/nest/test/jest-e2e.json +9 -9
- package/template/nest/tsconfig.build.json +5 -5
- package/template/nest/tsconfig.json +21 -21
- package/template/web-app/react/package.json +1 -1
- package/template/workspace/nx/node_modules/.pnpm/minipass-fetch@3.0.3/node_modules/minipass-sized/.gitignore +22 -0
- package/template/workspace/nx/node_modules/.pnpm/minipass-sized@1.0.3/node_modules/minipass-sized/.gitignore +22 -0
- package/template/workspace/nx/node_modules/.pnpm/node_modules/minipass-sized/.gitignore +22 -0
- package/template/workspace/nx/node_modules/.pnpm/node_modules/npm-normalize-package-bin/.gitignore +24 -0
- package/template/workspace/nx/node_modules/.pnpm/npm-bundled@1.1.2/node_modules/npm-normalize-package-bin/.gitignore +24 -0
- package/template/workspace/nx/node_modules/.pnpm/npm-normalize-package-bin@1.0.1/node_modules/npm-normalize-package-bin/.gitignore +24 -0
- package/template/workspace/nx/node_modules/.pnpm/npm-packlist@5.1.1/node_modules/npm-normalize-package-bin/.gitignore +24 -0
- package/template/lib/ts/jest.config.js +0 -185
- package/template/web-app/next/.husky/_/.gitignore +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 1k
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 1k
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -6,25 +6,24 @@
|
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
-
"test": "
|
|
9
|
+
"test": "vitest run --coverage",
|
|
10
|
+
"test:dev": "vitest"
|
|
10
11
|
},
|
|
11
12
|
"files": [
|
|
12
13
|
"dist"
|
|
13
14
|
],
|
|
14
15
|
"license": "ISC",
|
|
15
16
|
"devDependencies": {
|
|
16
|
-
"@types/jest": "^29.5.2",
|
|
17
17
|
"@typescript-eslint/eslint-plugin": "5.60.1",
|
|
18
18
|
"@typescript-eslint/parser": "5.60.1",
|
|
19
19
|
"eslint": "8.43.0",
|
|
20
20
|
"eslint-import-resolver-typescript": "3.5.5",
|
|
21
21
|
"eslint-plugin-import": "2.27.5",
|
|
22
22
|
"eslint-plugin-prettier": "4.2.1",
|
|
23
|
-
"jest": "^29.5.0",
|
|
24
23
|
"prettier": "2.8.8",
|
|
25
24
|
"stylelint": "15.9.0",
|
|
26
25
|
"stylelint-config-standard": "33.0.0",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
26
|
+
"typescript": "5.1.3",
|
|
27
|
+
"vitest": "0.34.2"
|
|
29
28
|
}
|
|
30
29
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parser: '@typescript-eslint/parser',
|
|
3
|
-
parserOptions: {
|
|
4
|
-
project: 'tsconfig.json',
|
|
5
|
-
tsconfigRootDir: __dirname,
|
|
6
|
-
sourceType: 'module',
|
|
7
|
-
},
|
|
8
|
-
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
9
|
-
extends: [
|
|
10
|
-
'plugin:@typescript-eslint/recommended',
|
|
11
|
-
'plugin:prettier/recommended',
|
|
12
|
-
],
|
|
13
|
-
root: true,
|
|
14
|
-
env: {
|
|
15
|
-
node: true,
|
|
16
|
-
jest: true,
|
|
17
|
-
},
|
|
18
|
-
ignorePatterns: ['.eslintrc.js'],
|
|
19
|
-
rules: {
|
|
20
|
-
'@typescript-eslint/interface-name-prefix': 'off',
|
|
21
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
22
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
23
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
24
|
-
},
|
|
25
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser',
|
|
3
|
+
parserOptions: {
|
|
4
|
+
project: 'tsconfig.json',
|
|
5
|
+
tsconfigRootDir: __dirname,
|
|
6
|
+
sourceType: 'module',
|
|
7
|
+
},
|
|
8
|
+
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
9
|
+
extends: [
|
|
10
|
+
'plugin:@typescript-eslint/recommended',
|
|
11
|
+
'plugin:prettier/recommended',
|
|
12
|
+
],
|
|
13
|
+
root: true,
|
|
14
|
+
env: {
|
|
15
|
+
node: true,
|
|
16
|
+
jest: true,
|
|
17
|
+
},
|
|
18
|
+
ignorePatterns: ['.eslintrc.js'],
|
|
19
|
+
rules: {
|
|
20
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
21
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
22
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
23
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
24
|
+
},
|
|
25
|
+
}
|
package/template/nest/.gitignore
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# compiled output
|
|
2
|
-
/dist
|
|
3
|
-
/node_modules
|
|
4
|
-
|
|
5
|
-
# Logs
|
|
6
|
-
logs
|
|
7
|
-
*.log
|
|
8
|
-
npm-debug.log*
|
|
9
|
-
pnpm-debug.log*
|
|
10
|
-
yarn-debug.log*
|
|
11
|
-
yarn-error.log*
|
|
12
|
-
lerna-debug.log*
|
|
13
|
-
|
|
14
|
-
# OS
|
|
15
|
-
.DS_Store
|
|
16
|
-
|
|
17
|
-
# Tests
|
|
18
|
-
/coverage
|
|
19
|
-
/.nyc_output
|
|
20
|
-
|
|
21
|
-
# IDEs and editors
|
|
22
|
-
/.idea
|
|
23
|
-
.project
|
|
24
|
-
.classpath
|
|
25
|
-
.c9/
|
|
26
|
-
*.launch
|
|
27
|
-
.settings/
|
|
28
|
-
*.sublime-workspace
|
|
29
|
-
|
|
30
|
-
# IDE - VSCode
|
|
31
|
-
.vscode/*
|
|
32
|
-
!.vscode/settings.json
|
|
33
|
-
!.vscode/tasks.json
|
|
34
|
-
!.vscode/launch.json
|
|
1
|
+
# compiled output
|
|
2
|
+
/dist
|
|
3
|
+
/node_modules
|
|
4
|
+
|
|
5
|
+
# Logs
|
|
6
|
+
logs
|
|
7
|
+
*.log
|
|
8
|
+
npm-debug.log*
|
|
9
|
+
pnpm-debug.log*
|
|
10
|
+
yarn-debug.log*
|
|
11
|
+
yarn-error.log*
|
|
12
|
+
lerna-debug.log*
|
|
13
|
+
|
|
14
|
+
# OS
|
|
15
|
+
.DS_Store
|
|
16
|
+
|
|
17
|
+
# Tests
|
|
18
|
+
/coverage
|
|
19
|
+
/.nyc_output
|
|
20
|
+
|
|
21
|
+
# IDEs and editors
|
|
22
|
+
/.idea
|
|
23
|
+
.project
|
|
24
|
+
.classpath
|
|
25
|
+
.c9/
|
|
26
|
+
*.launch
|
|
27
|
+
.settings/
|
|
28
|
+
*.sublime-workspace
|
|
29
|
+
|
|
30
|
+
# IDE - VSCode
|
|
31
|
+
.vscode/*
|
|
32
|
+
!.vscode/settings.json
|
|
33
|
+
!.vscode/tasks.json
|
|
34
|
+
!.vscode/launch.json
|
|
35
35
|
!.vscode/extensions.json
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env sh
|
|
2
|
-
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
-
|
|
4
|
-
npm run lint
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
. "$(dirname -- "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
npm run lint
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"singleQuote": true,
|
|
3
|
-
"trailingComma": "all",
|
|
4
|
-
"tabWidth": 4,
|
|
5
|
-
"semi": false
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"singleQuote": true,
|
|
3
|
+
"trailingComma": "all",
|
|
4
|
+
"tabWidth": 4,
|
|
5
|
+
"semi": false
|
|
6
|
+
}
|
package/template/nest/README.md
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
|
6
|
-
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
|
7
|
-
|
|
8
|
-
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
|
9
|
-
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
|
11
|
-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
|
12
|
-
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
|
13
|
-
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
|
14
|
-
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
|
15
|
-
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
|
16
|
-
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
|
17
|
-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
|
18
|
-
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
|
|
19
|
-
<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>
|
|
20
|
-
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
|
|
21
|
-
</p>
|
|
22
|
-
<!--[](https://opencollective.com/nest#backer)
|
|
23
|
-
[](https://opencollective.com/nest#sponsor)-->
|
|
24
|
-
|
|
25
|
-
## Description
|
|
26
|
-
|
|
27
|
-
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
|
28
|
-
|
|
29
|
-
## Installation
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
$ npm install
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Running the app
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
# development
|
|
39
|
-
$ npm run start
|
|
40
|
-
|
|
41
|
-
# watch mode
|
|
42
|
-
$ npm run start:dev
|
|
43
|
-
|
|
44
|
-
# production mode
|
|
45
|
-
$ npm run start:prod
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Test
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# unit tests
|
|
52
|
-
$ npm run test
|
|
53
|
-
|
|
54
|
-
# e2e tests
|
|
55
|
-
$ npm run test:e2e
|
|
56
|
-
|
|
57
|
-
# test coverage
|
|
58
|
-
$ npm run test:cov
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Support
|
|
62
|
-
|
|
63
|
-
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
|
64
|
-
|
|
65
|
-
## Stay in touch
|
|
66
|
-
|
|
67
|
-
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
|
|
68
|
-
- Website - [https://nestjs.com](https://nestjs.com/)
|
|
69
|
-
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
|
70
|
-
|
|
71
|
-
## License
|
|
72
|
-
|
|
73
|
-
Nest is [MIT licensed](LICENSE).
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
|
6
|
+
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
|
7
|
+
|
|
8
|
+
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
|
11
|
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
|
12
|
+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
|
13
|
+
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
|
14
|
+
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
|
15
|
+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
|
16
|
+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
|
17
|
+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
|
18
|
+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
|
|
19
|
+
<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>
|
|
20
|
+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
|
|
21
|
+
</p>
|
|
22
|
+
<!--[](https://opencollective.com/nest#backer)
|
|
23
|
+
[](https://opencollective.com/nest#sponsor)-->
|
|
24
|
+
|
|
25
|
+
## Description
|
|
26
|
+
|
|
27
|
+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
$ npm install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Running the app
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# development
|
|
39
|
+
$ npm run start
|
|
40
|
+
|
|
41
|
+
# watch mode
|
|
42
|
+
$ npm run start:dev
|
|
43
|
+
|
|
44
|
+
# production mode
|
|
45
|
+
$ npm run start:prod
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Test
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# unit tests
|
|
52
|
+
$ npm run test
|
|
53
|
+
|
|
54
|
+
# e2e tests
|
|
55
|
+
$ npm run test:e2e
|
|
56
|
+
|
|
57
|
+
# test coverage
|
|
58
|
+
$ npm run test:cov
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Support
|
|
62
|
+
|
|
63
|
+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
|
|
64
|
+
|
|
65
|
+
## Stay in touch
|
|
66
|
+
|
|
67
|
+
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
|
|
68
|
+
- Website - [https://nestjs.com](https://nestjs.com/)
|
|
69
|
+
- Twitter - [@nestframework](https://twitter.com/nestframework)
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
Nest is [MIT licensed](LICENSE).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/nest-cli",
|
|
3
|
-
"collection": "@nestjs/schematics",
|
|
4
|
-
"sourceRoot": "src"
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/nest-cli",
|
|
3
|
+
"collection": "@nestjs/schematics",
|
|
4
|
+
"sourceRoot": "src"
|
|
5
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Test, TestingModule } from '@nestjs/testing'
|
|
2
|
-
import { AppController } from './app.controller'
|
|
3
|
-
import { AppService } from './app.service'
|
|
4
|
-
|
|
5
|
-
describe('AppController', () => {
|
|
6
|
-
let appController: AppController
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
const app: TestingModule = await Test.createTestingModule({
|
|
10
|
-
controllers: [AppController],
|
|
11
|
-
providers: [AppService],
|
|
12
|
-
}).compile()
|
|
13
|
-
|
|
14
|
-
appController = app.get<AppController>(AppController)
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
describe('root', () => {
|
|
18
|
-
it('should return "Hello World!"', () => {
|
|
19
|
-
expect(appController.getHello()).toBe('Hello World!')
|
|
20
|
-
})
|
|
21
|
-
})
|
|
22
|
-
})
|
|
1
|
+
import { Test, TestingModule } from '@nestjs/testing'
|
|
2
|
+
import { AppController } from './app.controller'
|
|
3
|
+
import { AppService } from './app.service'
|
|
4
|
+
|
|
5
|
+
describe('AppController', () => {
|
|
6
|
+
let appController: AppController
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
const app: TestingModule = await Test.createTestingModule({
|
|
10
|
+
controllers: [AppController],
|
|
11
|
+
providers: [AppService],
|
|
12
|
+
}).compile()
|
|
13
|
+
|
|
14
|
+
appController = app.get<AppController>(AppController)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
describe('root', () => {
|
|
18
|
+
it('should return "Hello World!"', () => {
|
|
19
|
+
expect(appController.getHello()).toBe('Hello World!')
|
|
20
|
+
})
|
|
21
|
+
})
|
|
22
|
+
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Controller, Get } from '@nestjs/common'
|
|
2
|
-
import { AppService } from './app.service'
|
|
3
|
-
|
|
4
|
-
@Controller()
|
|
5
|
-
export class AppController {
|
|
6
|
-
constructor(private readonly appService: AppService) {}
|
|
7
|
-
|
|
8
|
-
@Get()
|
|
9
|
-
getHello(): string {
|
|
10
|
-
return this.appService.getHello()
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
import { Controller, Get } from '@nestjs/common'
|
|
2
|
+
import { AppService } from './app.service'
|
|
3
|
+
|
|
4
|
+
@Controller()
|
|
5
|
+
export class AppController {
|
|
6
|
+
constructor(private readonly appService: AppService) {}
|
|
7
|
+
|
|
8
|
+
@Get()
|
|
9
|
+
getHello(): string {
|
|
10
|
+
return this.appService.getHello()
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Module } from '@nestjs/common'
|
|
2
|
-
import { AppController } from './app.controller'
|
|
3
|
-
import { AppService } from './app.service'
|
|
4
|
-
|
|
5
|
-
@Module({
|
|
6
|
-
imports: [],
|
|
7
|
-
controllers: [AppController],
|
|
8
|
-
providers: [AppService],
|
|
9
|
-
})
|
|
10
|
-
export class AppModule {}
|
|
1
|
+
import { Module } from '@nestjs/common'
|
|
2
|
+
import { AppController } from './app.controller'
|
|
3
|
+
import { AppService } from './app.service'
|
|
4
|
+
|
|
5
|
+
@Module({
|
|
6
|
+
imports: [],
|
|
7
|
+
controllers: [AppController],
|
|
8
|
+
providers: [AppService],
|
|
9
|
+
})
|
|
10
|
+
export class AppModule {}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common'
|
|
2
|
-
|
|
3
|
-
@Injectable()
|
|
4
|
-
export class AppService {
|
|
5
|
-
getHello(): string {
|
|
6
|
-
return 'Hello World!'
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
import { Injectable } from '@nestjs/common'
|
|
2
|
+
|
|
3
|
+
@Injectable()
|
|
4
|
+
export class AppService {
|
|
5
|
+
getHello(): string {
|
|
6
|
+
return 'Hello World!'
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { NestFactory } from '@nestjs/core'
|
|
2
|
-
import { AppModule } from './app.module'
|
|
3
|
-
import { TransformInterceptor } from 'src/utils/transform.interceptor'
|
|
4
|
-
|
|
5
|
-
async function bootstrap() {
|
|
6
|
-
const app = await NestFactory.create(AppModule)
|
|
7
|
-
app.useGlobalInterceptors(new TransformInterceptor())
|
|
8
|
-
await app.listen(3000)
|
|
9
|
-
}
|
|
10
|
-
bootstrap()
|
|
1
|
+
import { NestFactory } from '@nestjs/core'
|
|
2
|
+
import { AppModule } from './app.module'
|
|
3
|
+
import { TransformInterceptor } from 'src/utils/transform.interceptor'
|
|
4
|
+
|
|
5
|
+
async function bootstrap() {
|
|
6
|
+
const app = await NestFactory.create(AppModule)
|
|
7
|
+
app.useGlobalInterceptors(new TransformInterceptor())
|
|
8
|
+
await app.listen(3000)
|
|
9
|
+
}
|
|
10
|
+
bootstrap()
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Injectable,
|
|
3
|
-
NestInterceptor,
|
|
4
|
-
ExecutionContext,
|
|
5
|
-
CallHandler,
|
|
6
|
-
} from '@nestjs/common'
|
|
7
|
-
import { Observable } from 'rxjs'
|
|
8
|
-
import { map } from 'rxjs/operators'
|
|
9
|
-
|
|
10
|
-
export interface Response<T> {
|
|
11
|
-
data: T
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Injectable()
|
|
15
|
-
export class TransformInterceptor<T>
|
|
16
|
-
implements NestInterceptor<T, Response<T>>
|
|
17
|
-
{
|
|
18
|
-
intercept(
|
|
19
|
-
context: ExecutionContext,
|
|
20
|
-
next: CallHandler,
|
|
21
|
-
): Observable<Response<T>> {
|
|
22
|
-
return next
|
|
23
|
-
.handle()
|
|
24
|
-
.pipe(map((data) => ({ code: 200, message: '', data })))
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Injectable,
|
|
3
|
+
NestInterceptor,
|
|
4
|
+
ExecutionContext,
|
|
5
|
+
CallHandler,
|
|
6
|
+
} from '@nestjs/common'
|
|
7
|
+
import { Observable } from 'rxjs'
|
|
8
|
+
import { map } from 'rxjs/operators'
|
|
9
|
+
|
|
10
|
+
export interface Response<T> {
|
|
11
|
+
data: T
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Injectable()
|
|
15
|
+
export class TransformInterceptor<T>
|
|
16
|
+
implements NestInterceptor<T, Response<T>>
|
|
17
|
+
{
|
|
18
|
+
intercept(
|
|
19
|
+
context: ExecutionContext,
|
|
20
|
+
next: CallHandler,
|
|
21
|
+
): Observable<Response<T>> {
|
|
22
|
+
return next
|
|
23
|
+
.handle()
|
|
24
|
+
.pipe(map((data) => ({ code: 200, message: '', data })))
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Test, TestingModule } from '@nestjs/testing'
|
|
2
|
-
import { INestApplication } from '@nestjs/common'
|
|
3
|
-
import * as request from 'supertest'
|
|
4
|
-
import { AppModule } from '../src/app.module'
|
|
5
|
-
|
|
6
|
-
describe('AppController (e2e)', () => {
|
|
7
|
-
let app: INestApplication
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
const moduleFixture: TestingModule = await Test.createTestingModule({
|
|
11
|
-
imports: [AppModule],
|
|
12
|
-
}).compile()
|
|
13
|
-
|
|
14
|
-
app = moduleFixture.createNestApplication()
|
|
15
|
-
await app.init()
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
it('/ (GET)', () => {
|
|
19
|
-
return request(app.getHttpServer())
|
|
20
|
-
.get('/')
|
|
21
|
-
.expect(200)
|
|
22
|
-
.expect('Hello World!')
|
|
23
|
-
})
|
|
24
|
-
})
|
|
1
|
+
import { Test, TestingModule } from '@nestjs/testing'
|
|
2
|
+
import { INestApplication } from '@nestjs/common'
|
|
3
|
+
import * as request from 'supertest'
|
|
4
|
+
import { AppModule } from '../src/app.module'
|
|
5
|
+
|
|
6
|
+
describe('AppController (e2e)', () => {
|
|
7
|
+
let app: INestApplication
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
const moduleFixture: TestingModule = await Test.createTestingModule({
|
|
11
|
+
imports: [AppModule],
|
|
12
|
+
}).compile()
|
|
13
|
+
|
|
14
|
+
app = moduleFixture.createNestApplication()
|
|
15
|
+
await app.init()
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('/ (GET)', () => {
|
|
19
|
+
return request(app.getHttpServer())
|
|
20
|
+
.get('/')
|
|
21
|
+
.expect(200)
|
|
22
|
+
.expect('Hello World!')
|
|
23
|
+
})
|
|
24
|
+
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
"moduleFileExtensions": ["js", "json", "ts"],
|
|
3
|
-
"rootDir": ".",
|
|
4
|
-
"testEnvironment": "node",
|
|
5
|
-
"testRegex": ".e2e-spec.ts$",
|
|
6
|
-
"transform": {
|
|
7
|
-
"^.+\\.(t|j)s$": "ts-jest"
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"moduleFileExtensions": ["js", "json", "ts"],
|
|
3
|
+
"rootDir": ".",
|
|
4
|
+
"testEnvironment": "node",
|
|
5
|
+
"testRegex": ".e2e-spec.ts$",
|
|
6
|
+
"transform": {
|
|
7
|
+
"^.+\\.(t|j)s$": "ts-jest"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"exclude": ["node_modules",
|
|
4
|
-
"test", "dist", "**/*spec.ts"]
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"exclude": ["node_modules",
|
|
4
|
+
"test", "dist", "**/*spec.ts"]
|
|
5
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"removeComments": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"target": "es2017",
|
|
10
|
-
"sourceMap": true,
|
|
11
|
-
"outDir": "./dist",
|
|
12
|
-
"baseUrl": "./",
|
|
13
|
-
"incremental": true,
|
|
14
|
-
"skipLibCheck": true,
|
|
15
|
-
"strictNullChecks": false,
|
|
16
|
-
"noImplicitAny": false,
|
|
17
|
-
"strictBindCallApply": false,
|
|
18
|
-
"forceConsistentCasingInFileNames": false,
|
|
19
|
-
"noFallthroughCasesInSwitch": false
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"removeComments": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"experimentalDecorators": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"target": "es2017",
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"outDir": "./dist",
|
|
12
|
+
"baseUrl": "./",
|
|
13
|
+
"incremental": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"strictNullChecks": false,
|
|
16
|
+
"noImplicitAny": false,
|
|
17
|
+
"strictBindCallApply": false,
|
|
18
|
+
"forceConsistentCasingInFileNames": false,
|
|
19
|
+
"noFallthroughCasesInSwitch": false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.travis.yml
|
|
19
|
+
!.gitignore
|
|
20
|
+
!.gitattributes
|
|
21
|
+
!coverage-map.js
|
|
22
|
+
!index.js
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.travis.yml
|
|
19
|
+
!.gitignore
|
|
20
|
+
!.gitattributes
|
|
21
|
+
!coverage-map.js
|
|
22
|
+
!index.js
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.travis.yml
|
|
19
|
+
!.gitignore
|
|
20
|
+
!.gitattributes
|
|
21
|
+
!coverage-map.js
|
|
22
|
+
!index.js
|
package/template/workspace/nx/node_modules/.pnpm/node_modules/npm-normalize-package-bin/.gitignore
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.github/
|
|
19
|
+
!.travis.yml
|
|
20
|
+
!.gitignore
|
|
21
|
+
!.gitattributes
|
|
22
|
+
!coverage-map.js
|
|
23
|
+
!map.js
|
|
24
|
+
!index.js
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.github/
|
|
19
|
+
!.travis.yml
|
|
20
|
+
!.gitignore
|
|
21
|
+
!.gitattributes
|
|
22
|
+
!coverage-map.js
|
|
23
|
+
!map.js
|
|
24
|
+
!index.js
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.github/
|
|
19
|
+
!.travis.yml
|
|
20
|
+
!.gitignore
|
|
21
|
+
!.gitattributes
|
|
22
|
+
!coverage-map.js
|
|
23
|
+
!map.js
|
|
24
|
+
!index.js
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ignore most things, include some others
|
|
2
|
+
/*
|
|
3
|
+
/.*
|
|
4
|
+
|
|
5
|
+
!bin/
|
|
6
|
+
!lib/
|
|
7
|
+
!docs/
|
|
8
|
+
!package.json
|
|
9
|
+
!package-lock.json
|
|
10
|
+
!README.md
|
|
11
|
+
!CONTRIBUTING.md
|
|
12
|
+
!LICENSE
|
|
13
|
+
!CHANGELOG.md
|
|
14
|
+
!example/
|
|
15
|
+
!scripts/
|
|
16
|
+
!tap-snapshots/
|
|
17
|
+
!test/
|
|
18
|
+
!.github/
|
|
19
|
+
!.travis.yml
|
|
20
|
+
!.gitignore
|
|
21
|
+
!.gitattributes
|
|
22
|
+
!coverage-map.js
|
|
23
|
+
!map.js
|
|
24
|
+
!index.js
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* For a detailed explanation regarding each configuration property, visit:
|
|
3
|
-
* https://jestjs.io/docs/configuration
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
// All imported modules in your tests should be mocked automatically
|
|
8
|
-
// automock: false,
|
|
9
|
-
|
|
10
|
-
// Stop running tests after `n` failures
|
|
11
|
-
// bail: 0,
|
|
12
|
-
|
|
13
|
-
// The directory where Jest should store its cached dependency information
|
|
14
|
-
// cacheDirectory: "/private/var/folders/hz/wwjd54d17xd_n09_zkrlx5v80000gn/T/jest_dx",
|
|
15
|
-
|
|
16
|
-
// Automatically clear mock calls and instances between every test
|
|
17
|
-
// clearMocks: false,
|
|
18
|
-
|
|
19
|
-
// Indicates whether the coverage information should be collected while executing the test
|
|
20
|
-
// collectCoverage: false,
|
|
21
|
-
|
|
22
|
-
// An array of glob patterns indicating a set of files for which coverage information should be collected
|
|
23
|
-
// collectCoverageFrom: undefined,
|
|
24
|
-
|
|
25
|
-
// The directory where Jest should output its coverage files
|
|
26
|
-
// coverageDirectory: undefined,
|
|
27
|
-
|
|
28
|
-
// An array of regexp pattern strings used to skip coverage collection
|
|
29
|
-
// coveragePathIgnorePatterns: [
|
|
30
|
-
// "/node_modules/"
|
|
31
|
-
// ],
|
|
32
|
-
|
|
33
|
-
// Indicates which provider should be used to instrument code for coverage
|
|
34
|
-
coverageProvider: 'v8',
|
|
35
|
-
|
|
36
|
-
// A list of reporter names that Jest uses when writing coverage reports
|
|
37
|
-
// coverageReporters: [
|
|
38
|
-
// "json",
|
|
39
|
-
// "text",
|
|
40
|
-
// "lcov",
|
|
41
|
-
// "clover"
|
|
42
|
-
// ],
|
|
43
|
-
|
|
44
|
-
// An object that configures minimum threshold enforcement for coverage results
|
|
45
|
-
// coverageThreshold: undefined,
|
|
46
|
-
|
|
47
|
-
// A path to a custom dependency extractor
|
|
48
|
-
// dependencyExtractor: undefined,
|
|
49
|
-
|
|
50
|
-
// Make calling deprecated APIs throw helpful error messages
|
|
51
|
-
// errorOnDeprecated: false,
|
|
52
|
-
|
|
53
|
-
// Force coverage collection from ignored files using an array of glob patterns
|
|
54
|
-
// forceCoverageMatch: [],
|
|
55
|
-
|
|
56
|
-
// A path to a module which exports an async function that is triggered once before all test suites
|
|
57
|
-
// globalSetup: undefined,
|
|
58
|
-
|
|
59
|
-
// A path to a module which exports an async function that is triggered once after all test suites
|
|
60
|
-
// globalTeardown: undefined,
|
|
61
|
-
|
|
62
|
-
// A set of global variables that need to be available in all test environments
|
|
63
|
-
// globals: {},
|
|
64
|
-
|
|
65
|
-
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
|
|
66
|
-
// maxWorkers: "50%",
|
|
67
|
-
|
|
68
|
-
// An array of directory names to be searched recursively up from the requiring module's location
|
|
69
|
-
// moduleDirectories: [
|
|
70
|
-
// "node_modules"
|
|
71
|
-
// ],
|
|
72
|
-
|
|
73
|
-
// An array of file extensions your modules use
|
|
74
|
-
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'],
|
|
75
|
-
|
|
76
|
-
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
|
|
77
|
-
// moduleNameMapper: {},
|
|
78
|
-
|
|
79
|
-
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
|
80
|
-
// modulePathIgnorePatterns: [],
|
|
81
|
-
|
|
82
|
-
// Activates notifications for test results
|
|
83
|
-
// notify: false,
|
|
84
|
-
|
|
85
|
-
// An enum that specifies notification mode. Requires { notify: true }
|
|
86
|
-
// notifyMode: "failure-change",
|
|
87
|
-
|
|
88
|
-
// A preset that is used as a base for Jest's configuration
|
|
89
|
-
preset: 'ts-jest',
|
|
90
|
-
|
|
91
|
-
// Run tests from one or more projects
|
|
92
|
-
// projects: undefined,
|
|
93
|
-
|
|
94
|
-
// Use this configuration option to add custom reporters to Jest
|
|
95
|
-
// reporters: undefined,
|
|
96
|
-
|
|
97
|
-
// Automatically reset mock state between every test
|
|
98
|
-
// resetMocks: false,
|
|
99
|
-
|
|
100
|
-
// Reset the module registry before running each individual test
|
|
101
|
-
// resetModules: false,
|
|
102
|
-
|
|
103
|
-
// A path to a custom resolver
|
|
104
|
-
// resolver: undefined,
|
|
105
|
-
|
|
106
|
-
// Automatically restore mock state between every test
|
|
107
|
-
// restoreMocks: false,
|
|
108
|
-
|
|
109
|
-
// The root directory that Jest should scan for tests and modules within
|
|
110
|
-
// rootDir: undefined,
|
|
111
|
-
|
|
112
|
-
// A list of paths to directories that Jest should use to search for files in
|
|
113
|
-
roots: ['<rootDir>/src'],
|
|
114
|
-
|
|
115
|
-
// Allows you to use a custom runner instead of Jest's default test runner
|
|
116
|
-
// runner: "jest-runner",
|
|
117
|
-
|
|
118
|
-
// The paths to modules that run some code to configure or set up the testing environment before each test
|
|
119
|
-
// setupFiles: [],
|
|
120
|
-
|
|
121
|
-
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
|
122
|
-
// setupFilesAfterEnv: [],
|
|
123
|
-
|
|
124
|
-
// The number of seconds after which a test is considered as slow and reported as such in the results.
|
|
125
|
-
// slowTestThreshold: 5,
|
|
126
|
-
|
|
127
|
-
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
|
|
128
|
-
// snapshotSerializers: [],
|
|
129
|
-
|
|
130
|
-
// The test environment that will be used for testing
|
|
131
|
-
testEnvironment: 'jsdom'
|
|
132
|
-
|
|
133
|
-
// Options that will be passed to the testEnvironment
|
|
134
|
-
// testEnvironmentOptions: {},
|
|
135
|
-
|
|
136
|
-
// Adds a location field to test results
|
|
137
|
-
// testLocationInResults: false,
|
|
138
|
-
|
|
139
|
-
// The glob patterns Jest uses to detect test files
|
|
140
|
-
// testMatch: [
|
|
141
|
-
// "**/__tests__/**/*.[jt]s?(x)",
|
|
142
|
-
// "**/?(*.)+(spec|test).[tj]s?(x)"
|
|
143
|
-
// ],
|
|
144
|
-
|
|
145
|
-
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
|
146
|
-
// testPathIgnorePatterns: [
|
|
147
|
-
// "/node_modules/"
|
|
148
|
-
// ],
|
|
149
|
-
|
|
150
|
-
// The regexp pattern or array of patterns that Jest uses to detect test files
|
|
151
|
-
// testRegex: [],
|
|
152
|
-
|
|
153
|
-
// This option allows the use of a custom results processor
|
|
154
|
-
// testResultsProcessor: undefined,
|
|
155
|
-
|
|
156
|
-
// This option allows use of a custom test runner
|
|
157
|
-
// testRunner: "jest-circus/runner",
|
|
158
|
-
|
|
159
|
-
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
|
|
160
|
-
// testURL: "http://localhost",
|
|
161
|
-
|
|
162
|
-
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
|
|
163
|
-
// timers: "real",
|
|
164
|
-
|
|
165
|
-
// A map from regular expressions to paths to transformers
|
|
166
|
-
// transform: undefined,
|
|
167
|
-
|
|
168
|
-
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
|
169
|
-
// transformIgnorePatterns: [
|
|
170
|
-
// "/node_modules/",
|
|
171
|
-
// "\\.pnp\\.[^\\/]+$"
|
|
172
|
-
// ],
|
|
173
|
-
|
|
174
|
-
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
|
|
175
|
-
// unmockedModulePathPatterns: undefined,
|
|
176
|
-
|
|
177
|
-
// Indicates whether each individual test should be reported during the run
|
|
178
|
-
// verbose: undefined,
|
|
179
|
-
|
|
180
|
-
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
|
|
181
|
-
// watchPathIgnorePatterns: [],
|
|
182
|
-
|
|
183
|
-
// Whether to use watchman for file crawling
|
|
184
|
-
// watchman: true,
|
|
185
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*
|