Skip to content

Commit 18acefc

Browse files
Alexander Kharkoveyklerick
authored andcommitted
feat(json-api-nestjs): new-version 3.x.x
support TypeOrm 3.x.x BREAKING CHANGE: change init custom controller change init config
1 parent 4a7f26a commit 18acefc

File tree

208 files changed

+52661
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+52661
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nrwl/nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nrwl/nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nrwl/nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nrwl/nx/javascript"],
32+
"rules": {}
33+
},
34+
{
35+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
36+
"env": {
37+
"jest": true
38+
},
39+
"rules": {}
40+
}
41+
]
42+
}

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
.angular

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Add files here to ignore them from prettier formatting
2+
3+
/dist
4+
/coverage

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

README.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
2+
3+
# NestjsJsonApi
4+
5+
This project was generated using [Nx](https://nx.dev).
6+
7+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>
8+
9+
🔎 **Smart, Fast and Extensible Build System**
10+
11+
## Quick Start & Documentation
12+
13+
[Nx Documentation](https://nx.dev/getting-started/intro)
14+
15+
[Mental model is a good starting point for those who like to understand things theoretically first.](https://nx.dev/concepts/mental-model)
16+
17+
[Interactive Tutorial](https://nx.dev/getting-started/angular-tutorial)
18+
19+
## Adding capabilities to your workspace
20+
21+
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
22+
23+
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
24+
25+
Below are our core plugins:
26+
27+
- [Angular](https://angular.io)
28+
- `ng add @nrwl/angular`
29+
- [React](https://reactjs.org)
30+
- `ng add @nrwl/react`
31+
- Web (no framework frontends)
32+
- `ng add @nrwl/web`
33+
- [Nest](https://nestjs.com)
34+
- `ng add @nrwl/nest`
35+
- [Express](https://expressjs.com)
36+
- `ng add @nrwl/express`
37+
- [Node](https://nodejs.org)
38+
- `ng add @nrwl/node`
39+
40+
There are also many [community plugins](https://nx.dev/community) you could add.
41+
42+
## Generate an application
43+
44+
Run `ng g @nrwl/angular:app my-app` to generate an application.
45+
46+
> You can use any of the plugins above to generate applications as well.
47+
48+
When using Nx, you can create multiple applications and libraries in the same workspace.
49+
50+
## Generate a library
51+
52+
Run `ng g @nrwl/angular:lib my-lib` to generate a library.
53+
54+
> You can also use any of the plugins above to generate libraries as well.
55+
56+
Libraries are shareable across libraries and applications. They can be imported from `@nestjs-json-api/mylib`.
57+
58+
## Development server
59+
60+
Run `ng serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
61+
62+
## Code scaffolding
63+
64+
Run `ng g component my-component --project=my-app` to generate a new component.
65+
66+
## Build
67+
68+
Run `ng build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
69+
70+
## Running unit tests
71+
72+
Run `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io).
73+
74+
Run `nx affected:test` to execute the unit tests affected by a change.
75+
76+
## Running end-to-end tests
77+
78+
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
79+
80+
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
81+
82+
## Understand your workspace
83+
84+
Run `nx graph` to see a diagram of the dependencies of your projects.
85+
86+
## Further help
87+
88+
Visit the [Nx Documentation](https://nx.dev/angular) to learn more.
89+
90+
91+
92+
93+
94+
95+
## ☁ Nx Cloud
96+
97+
### Distributed Computation Caching & Distributed Task Execution
98+
99+
<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png"></p>
100+
101+
Nx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly.
102+
103+
Teams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nx’s advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers.
104+
105+
Visit [Nx Cloud](https://nx.app/) to learn more.

apps/.gitkeep

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": [
8+
"plugin:@nrwl/nx/angular",
9+
"plugin:@angular-eslint/template/process-inline-templates"
10+
],
11+
"rules": {
12+
"@angular-eslint/directive-selector": [
13+
"error",
14+
{
15+
"type": "attribute",
16+
"prefix": "nestjsJsonApi",
17+
"style": "camelCase"
18+
}
19+
],
20+
"@angular-eslint/component-selector": [
21+
"error",
22+
{
23+
"type": "element",
24+
"prefix": "nestjs-json-api",
25+
"style": "kebab-case"
26+
}
27+
]
28+
}
29+
},
30+
{
31+
"files": ["*.html"],
32+
"extends": ["plugin:@nrwl/nx/angular-template"],
33+
"rules": {}
34+
}
35+
]
36+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'example-angular-client',
4+
preset: '../../jest.preset.js',
5+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6+
globals: {
7+
'ts-jest': {
8+
tsconfig: '<rootDir>/tsconfig.spec.json',
9+
stringifyContentPathRegex: '\\.(html|svg)$',
10+
},
11+
},
12+
coverageDirectory: '../../coverage/apps/example-angular-client',
13+
transform: {
14+
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
15+
},
16+
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
17+
snapshotSerializers: [
18+
'jest-preset-angular/build/serializers/no-ng-attributes',
19+
'jest-preset-angular/build/serializers/ng-snapshot',
20+
'jest-preset-angular/build/serializers/html-comment',
21+
],
22+
};

0 commit comments

Comments
 (0)