@decaf-ts/db-decorators 0.4.32 → 0.4.34
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/README.md +32 -108
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,20 +7,17 @@ Extension to Decorator Validation with common db functionalities
|
|
|
7
7
|

|
|
8
8
|

|
|
9
9
|

|
|
10
|
-
|
|
11
|
-
[](https://github.com/decaf-ts/db-decorators/actions/workflows/nodejs-build-prod.yaml)
|
|
12
|
+
[](https://github.com/decaf-ts/db-decorators/actions/workflows/codeql-analysis.yml)[](https://github.com/decaf-ts/db-decorators/actions/workflows/snyk-analysis.yaml)
|
|
13
|
+
[](https://github.com/decaf-ts/db-decorators/actions/workflows/pages.yaml)
|
|
14
|
+
[](https://github.com/decaf-ts/db-decorators/actions/workflows/release-on-tag.yaml)
|
|
12
15
|
|
|
13
16
|

|
|
14
17
|

|
|
15
18
|

|
|
16
19
|

|
|
17
20
|
|
|
18
|
-

|
|
19
|
-

|
|
20
|
-

|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
|
|
24
21
|

|
|
25
22
|

|
|
26
23
|

|
|
@@ -28,107 +25,36 @@ Extension to Decorator Validation with common db functionalities
|
|
|
28
25
|

|
|
29
26
|

|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
Documentation available [here](https://decaf-ts.github.io/db-decorators/)
|
|
29
|
+
|
|
30
|
+
### Description
|
|
31
|
+
|
|
32
|
+
Declarative approach to database decorators
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### How to Use
|
|
36
|
+
|
|
37
|
+
- [Initial Setup](../../workdocs/tutorials/For%20Developers.md#_initial-setup_)
|
|
38
|
+
- [Installation](../../workdocs/tutorials/For%20Developers.md#installation)
|
|
39
|
+
|
|
32
40
|
|
|
33
|
-
## Considerations
|
|
34
41
|
|
|
35
|
-
#### Typescript Compilation options
|
|
36
42
|
|
|
37
|
-
Even though all code is exported in both CommonJS and ESM format, and the default is ES2022
|
|
38
|
-
in order to take advantage to all the latest Typescript and JS features,
|
|
39
|
-
when importing these libraries the following flag in `tsconfig.compilerOptions` is mandatory:
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"experimentalDecorators": true,
|
|
43
|
-
"emitDecoratorMetadata": true,
|
|
44
|
-
"useDefineForClassFields": false
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
43
|
### Related
|
|
48
44
|
|
|
49
|
-
[](https://github.com/decaf-ts/decaf-ts)
|
|
46
|
+
[](https://github.com/decaf-ts/decorator-validation)
|
|
47
|
+
[](https://github.com/decaf-ts/Reflection)
|
|
48
|
+
|
|
49
|
+
|
|
51
50
|
### Social
|
|
52
51
|
|
|
53
52
|
[](https://www.linkedin.com/in/decaf-ts/)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- `do-install` - sets a `TOKEN` environment variable to the contents of `.token` and runs npm install (useful when you
|
|
60
|
-
have private dependencies);
|
|
61
|
-
- `flash-forward` - updates all dependencies. Take care, This may not be desirable is some cases;
|
|
62
|
-
- `reset` - updates all dependencies. Take care, This may not be desirable is some cases;
|
|
63
|
-
- `build` - builds the code (via gulp `gulpfile.js`) in development mode (generates `lib` and `dist` folder);
|
|
64
|
-
- `build:prod` - builds the code (via gulp `gulpfile.js`) in production mode (generates `lib` and `dist` folder);
|
|
65
|
-
- `test` - runs unit tests;
|
|
66
|
-
- `test:integration` - runs it tests;
|
|
67
|
-
- `test:all` - runs all tests;
|
|
68
|
-
- `lint` - runs es lint on the code folder;
|
|
69
|
-
- `lint-fix` - tries to auto-fix the code folder;
|
|
70
|
-
- `prepare-release` - defines the commands to run prior to a new tag (defaults to linting, building production code,
|
|
71
|
-
running tests and documentation generation);
|
|
72
|
-
- `release` - triggers a new tag being pushed to master (via `./bin/tag_release.sh`);
|
|
73
|
-
- `clean-publish` - cleans the package.json for publishing;
|
|
74
|
-
- `coverage` - runs all test, calculates coverage and generates badges for readme;
|
|
75
|
-
- `drawings` - compiles all DrawIO `*.drawio` files in the `workdocs/drawings` folder to png and moves them to
|
|
76
|
-
the `workdocs/resources` folder;
|
|
77
|
-
- `uml` - compiles all PlantUML `*.puml` files in the `workdocs/uml` folder to png and moves them to
|
|
78
|
-
the `workdocs/resources` folder;
|
|
79
|
-
- `docs` - compiles all the coverage, drawings, uml, jsdocs and md docs into a readable web page under `./docs`;
|
|
80
|
-
|
|
81
|
-
### Repository Structure
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
db-decorators
|
|
85
|
-
│
|
|
86
|
-
│ .gitignore <-- Defines files ignored to git
|
|
87
|
-
│ .npmignore <-- Defines files ignored by npm
|
|
88
|
-
│ .nmprc <-- Defines the Npm registry for this package
|
|
89
|
-
│ .eslintrc.cjs <-- linting for the project
|
|
90
|
-
│ .prettier.config.cjs <-- Code style for the project
|
|
91
|
-
│ .gitlab-ci.yml <-- Gillab CI/CD file
|
|
92
|
-
│ gulpfile.js <-- Gulp build scripts. used for building na other features (eg docs)
|
|
93
|
-
│ jest.config.ts <-- Tests Configuration file
|
|
94
|
-
│ mdCompile.json <-- md Documentation generation configuration file
|
|
95
|
-
│ jsdocs.json <-- jsdoc Documentation generation configuration file
|
|
96
|
-
│ Dockerfile <-- minimal example of a node service Dockerfile
|
|
97
|
-
│ LICENCE.md <-- Licence disclamer
|
|
98
|
-
│ package.json
|
|
99
|
-
│ package-lock.json
|
|
100
|
-
│ README.md <-- Readme File dynamically compiled from 'workdocs' via the 'docs' npm script
|
|
101
|
-
│ tsconfig.json <-- Typescript config file. Is overriden in 'gulpfile.js'
|
|
102
|
-
│
|
|
103
|
-
└───bin
|
|
104
|
-
│ │ tag_release.sh <-- Script to help with releases
|
|
105
|
-
│
|
|
106
|
-
└───docs
|
|
107
|
-
│ │ ... <-- Dinamically generated folder, containing the compiled documentation for this repository. generated via the 'docs' npm script
|
|
108
|
-
│
|
|
109
|
-
└───src
|
|
110
|
-
│ │ ... <-- Source code for this repository
|
|
111
|
-
│
|
|
112
|
-
└───tests
|
|
113
|
-
│ │───unit <-- Unit tests
|
|
114
|
-
│ └───integration <-- Integration tests
|
|
115
|
-
│
|
|
116
|
-
└───workdocs <-- Folder with all pre-compiled documentation
|
|
117
|
-
│ │───assets <-- Documentation asset folder
|
|
118
|
-
│ │───badges <-- Auto generated coverage badges folder
|
|
119
|
-
│ │───coverage <-- Auto generated coverage results
|
|
120
|
-
│ │───drawings <-- DrawIO folder. Drawings (*.drawio) here will be processed to generate documentation (requires docker)
|
|
121
|
-
│ │───uml <-- PlantUML folder. Diagrams (*.puml) here will be processed to generate documentation (requires docker)
|
|
122
|
-
│ │───tutorials <-- Tutorial folder
|
|
123
|
-
│ │ ... <-- Categorized *.md files that are merged to generate the final readme (via md compile)
|
|
124
|
-
│ │ Readme.md <-- Entry point to the README.md
|
|
125
|
-
│
|
|
126
|
-
└───dist
|
|
127
|
-
│ │ ... <-- Dinamically generated folder containing the bundles for distribution
|
|
128
|
-
│
|
|
129
|
-
└───lib
|
|
130
|
-
| ... <-- Dinamically generated folder containing the compiled code
|
|
131
|
-
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
#### Languages
|
|
132
58
|
|
|
133
59
|

|
|
134
60
|

|
|
@@ -137,24 +63,22 @@ db-decorators
|
|
|
137
63
|
|
|
138
64
|
## Getting help
|
|
139
65
|
|
|
140
|
-
If you have bug reports, questions or suggestions please [create a new issue](https://github.com/decaf-ts/
|
|
66
|
+
If you have bug reports, questions or suggestions please [create a new issue](https://github.com/decaf-ts/ts-workspace/issues/new/choose).
|
|
141
67
|
|
|
142
68
|
## Contributing
|
|
143
69
|
|
|
144
|
-
I am grateful for any contributions made to this project. Please read [this](./workdocs/
|
|
70
|
+
I am grateful for any contributions made to this project. Please read [this](./workdocs/98-Contributing.md) to get started.
|
|
145
71
|
|
|
146
72
|
## Supporting
|
|
147
73
|
|
|
148
74
|
The first and easiest way you can support it is by [Contributing](./workdocs/98-Contributing.md). Even just finding a typo in the documentation is important.
|
|
149
75
|
|
|
150
|
-
Financial support is always welcome and helps keep
|
|
76
|
+
Financial support is always welcome and helps keep both me and the project alive and healthy.
|
|
151
77
|
|
|
152
78
|
So if you can, if this project in any way. either by learning something or simply by helping you save precious time, please consider donating.
|
|
153
79
|
|
|
154
80
|
## License
|
|
155
81
|
|
|
156
|
-
This project is released under the [MIT License](LICENSE.md).
|
|
157
|
-
|
|
158
|
-
#### Disclaimer:
|
|
82
|
+
This project is released under the [MIT License](./LICENSE.md).
|
|
159
83
|
|
|
160
|
-
|
|
84
|
+
By developers, for developers...
|