@decaf-ts/for-pouch 0.0.8 → 0.1.1
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.md +157 -21
- package/README.md +44 -244
- package/dist/for-pouch.cjs +222 -0
- package/dist/for-pouch.esm.cjs +218 -0
- package/lib/PouchRepository.cjs +1 -2
- package/lib/PouchRepository.d.ts +0 -0
- package/lib/adapter.cjs +1 -2
- package/lib/adapter.d.ts +0 -0
- package/lib/esm/PouchRepository.d.ts +0 -0
- package/lib/esm/PouchRepository.js +1 -2
- package/lib/esm/adapter.d.ts +0 -0
- package/lib/esm/adapter.js +1 -2
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +2 -3
- package/lib/index.cjs +2 -3
- package/lib/index.d.ts +1 -1
- package/package.json +38 -42
- package/dist/esm/for-pouch.bundle.min.esm.js +0 -2
- package/dist/esm/for-pouch.bundle.min.esm.js.LICENSE.txt +0 -14
- package/dist/for-pouch.bundle.min.js +0 -2
- package/dist/for-pouch.bundle.min.js.LICENSE.txt +0 -14
package/LICENSE.md
CHANGED
|
@@ -1,21 +1,157 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
|
|
3
|
+
Version 3, 29 June 2007
|
|
4
|
+
|
|
5
|
+
Copyright (C) 2025 Tiago Venceslau
|
|
6
|
+
<https:/github.com/TiagoVenceslau>
|
|
7
|
+
|
|
8
|
+
Everyone is permitted to copy and distribute verbatim copies of this
|
|
9
|
+
license document, but changing it is not allowed.
|
|
10
|
+
|
|
11
|
+
This version of the GNU Lesser General Public License incorporates the
|
|
12
|
+
terms and conditions of version 3 of the GNU General Public License,
|
|
13
|
+
supplemented by the additional permissions listed below.
|
|
14
|
+
|
|
15
|
+
## 0. Additional Definitions.
|
|
16
|
+
|
|
17
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
18
|
+
General Public License, and the "GNU GPL" refers to version 3 of the
|
|
19
|
+
GNU General Public License.
|
|
20
|
+
|
|
21
|
+
"The Library" refers to a covered work governed by this License, other
|
|
22
|
+
than an Application or a Combined Work as defined below.
|
|
23
|
+
|
|
24
|
+
An "Application" is any work that makes use of an interface provided
|
|
25
|
+
by the Library, but which is not otherwise based on the Library.
|
|
26
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
27
|
+
of using an interface provided by the Library.
|
|
28
|
+
|
|
29
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
30
|
+
Application with the Library. The particular version of the Library
|
|
31
|
+
with which the Combined Work was made is also called the "Linked
|
|
32
|
+
Version".
|
|
33
|
+
|
|
34
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
35
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
36
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
37
|
+
based on the Application, and not on the Linked Version.
|
|
38
|
+
|
|
39
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
40
|
+
object code and/or source code for the Application, including any data
|
|
41
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
42
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
43
|
+
|
|
44
|
+
## 1. Exception to Section 3 of the GNU GPL.
|
|
45
|
+
|
|
46
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
47
|
+
without being bound by section 3 of the GNU GPL.
|
|
48
|
+
|
|
49
|
+
## 2. Conveying Modified Versions.
|
|
50
|
+
|
|
51
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
52
|
+
facility refers to a function or data to be supplied by an Application
|
|
53
|
+
that uses the facility (other than as an argument passed when the
|
|
54
|
+
facility is invoked), then you may convey a copy of the modified
|
|
55
|
+
version:
|
|
56
|
+
|
|
57
|
+
- a) under this License, provided that you make a good faith effort
|
|
58
|
+
to ensure that, in the event an Application does not supply the
|
|
59
|
+
function or data, the facility still operates, and performs
|
|
60
|
+
whatever part of its purpose remains meaningful, or
|
|
61
|
+
- b) under the GNU GPL, with none of the additional permissions of
|
|
62
|
+
this License applicable to that copy.
|
|
63
|
+
|
|
64
|
+
## 3. Object Code Incorporating Material from Library Header Files.
|
|
65
|
+
|
|
66
|
+
The object code form of an Application may incorporate material from a
|
|
67
|
+
header file that is part of the Library. You may convey such object
|
|
68
|
+
code under terms of your choice, provided that, if the incorporated
|
|
69
|
+
material is not limited to numerical parameters, data structure
|
|
70
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
71
|
+
(ten or fewer lines in length), you do both of the following:
|
|
72
|
+
|
|
73
|
+
- a) Give prominent notice with each copy of the object code that
|
|
74
|
+
the Library is used in it and that the Library and its use are
|
|
75
|
+
covered by this License.
|
|
76
|
+
- b) Accompany the object code with a copy of the GNU GPL and this
|
|
77
|
+
license document.
|
|
78
|
+
|
|
79
|
+
## 4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that, taken
|
|
82
|
+
together, effectively do not restrict modification of the portions of
|
|
83
|
+
the Library contained in the Combined Work and reverse engineering for
|
|
84
|
+
debugging such modifications, if you also do each of the following:
|
|
85
|
+
|
|
86
|
+
- a) Give prominent notice with each copy of the Combined Work that
|
|
87
|
+
the Library is used in it and that the Library and its use are
|
|
88
|
+
covered by this License.
|
|
89
|
+
- b) Accompany the Combined Work with a copy of the GNU GPL and this
|
|
90
|
+
license document.
|
|
91
|
+
- c) For a Combined Work that displays copyright notices during
|
|
92
|
+
execution, include the copyright notice for the Library among
|
|
93
|
+
these notices, as well as a reference directing the user to the
|
|
94
|
+
copies of the GNU GPL and this license document.
|
|
95
|
+
- d) Do one of the following:
|
|
96
|
+
- 0) Convey the Minimal Corresponding Source under the terms of
|
|
97
|
+
this License, and the Corresponding Application Code in a form
|
|
98
|
+
suitable for, and under terms that permit, the user to
|
|
99
|
+
recombine or relink the Application with a modified version of
|
|
100
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
101
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
102
|
+
Corresponding Source.
|
|
103
|
+
- 1) Use a suitable shared library mechanism for linking with
|
|
104
|
+
the Library. A suitable mechanism is one that (a) uses at run
|
|
105
|
+
time a copy of the Library already present on the user's
|
|
106
|
+
computer system, and (b) will operate properly with a modified
|
|
107
|
+
version of the Library that is interface-compatible with the
|
|
108
|
+
Linked Version.
|
|
109
|
+
- e) Provide Installation Information, but only if you would
|
|
110
|
+
otherwise be required to provide such information under section 6
|
|
111
|
+
of the GNU GPL, and only to the extent that such information is
|
|
112
|
+
necessary to install and execute a modified version of the
|
|
113
|
+
Combined Work produced by recombining or relinking the Application
|
|
114
|
+
with a modified version of the Linked Version. (If you use option
|
|
115
|
+
4d0, the Installation Information must accompany the Minimal
|
|
116
|
+
Corresponding Source and Corresponding Application Code. If you
|
|
117
|
+
use option 4d1, you must provide the Installation Information in
|
|
118
|
+
the manner specified by section 6 of the GNU GPL for conveying
|
|
119
|
+
Corresponding Source.)
|
|
120
|
+
|
|
121
|
+
## 5. Combined Libraries.
|
|
122
|
+
|
|
123
|
+
You may place library facilities that are a work based on the Library
|
|
124
|
+
side by side in a single library together with other library
|
|
125
|
+
facilities that are not Applications and are not covered by this
|
|
126
|
+
License, and convey such a combined library under terms of your
|
|
127
|
+
choice, if you do both of the following:
|
|
128
|
+
|
|
129
|
+
- a) Accompany the combined library with a copy of the same work
|
|
130
|
+
based on the Library, uncombined with any other library
|
|
131
|
+
facilities, conveyed under the terms of this License.
|
|
132
|
+
- b) Give prominent notice with the combined library that part of it
|
|
133
|
+
is a work based on the Library, and explaining where to find the
|
|
134
|
+
accompanying uncombined form of the same work.
|
|
135
|
+
|
|
136
|
+
## 6. Revised Versions of the GNU Lesser General Public License.
|
|
137
|
+
|
|
138
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
139
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
140
|
+
versions will be similar in spirit to the present version, but may
|
|
141
|
+
differ in detail to address new problems or concerns.
|
|
142
|
+
|
|
143
|
+
Each version is given a distinguishing version number. If the Library
|
|
144
|
+
as you received it specifies that a certain numbered version of the
|
|
145
|
+
GNU Lesser General Public License "or any later version" applies to
|
|
146
|
+
it, you have the option of following the terms and conditions either
|
|
147
|
+
of that published version or of any later version published by the
|
|
148
|
+
Free Software Foundation. If the Library as you received it does not
|
|
149
|
+
specify a version number of the GNU Lesser General Public License, you
|
|
150
|
+
may choose any version of the GNU Lesser General Public License ever
|
|
151
|
+
published by the Free Software Foundation.
|
|
152
|
+
|
|
153
|
+
If the Library as you received it specifies that a proxy can decide
|
|
154
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
155
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
156
|
+
permanent authorization for you to choose that version for the
|
|
157
|
+
Library.
|
package/README.md
CHANGED
|
@@ -1,271 +1,73 @@
|
|
|
1
1
|

|
|
2
|
-
## Typescript Template
|
|
3
2
|
|
|
3
|
+
# Decaf's PouchDB (CouchDB) Module
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
5
8
|
|
|
6
|
-
](https://github.com/decaf-ts/ts-workspace/actions?query=workflow%3ACodeQL)
|
|
9
|
+
[](https://github.com/decaf-ts/for-pouch/actions/workflows/nodejs-build-prod.yaml)
|
|
10
|
+
[](https://github.com/decaf-ts/for-pouch/actions/workflows/codeql-analysis.yml)[](https://github.com/decaf-ts/for-pouch/actions/workflows/snyk-analysis.yaml)
|
|
11
|
+
[](https://github.com/decaf-ts/for-pouch/actions/workflows/pages.yaml)
|
|
12
|
+
[](https://github.com/decaf-ts/for-pouch/actions/workflows/release-on-tag.yaml)
|
|
11
13
|
|
|
12
|
-

|
|
15
|
+

|
|
16
|
+

|
|
15
17
|

|
|
16
18
|
|
|
17
|
-

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

|
|
24
|
-

|
|
25
|
-

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+

|
|
26
22
|
|
|
27
23
|

|
|
28
24
|

|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
Documentation available [here](https://decaf-ts.github.io/for-pouch/)
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
### Description
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
No one needs the hassle of setting up new repos every time.
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
Now you can create new repositories from this template and enjoy having everything set up for you.
|
|
37
33
|
|
|
38
|
-
Auto setup on first `npm install`
|
|
39
34
|
|
|
40
|
-
Will accept a `.token` file containing token valid for private npm dependencies, npm and docker registries
|
|
41
35
|
|
|
42
|
-
###
|
|
36
|
+
### How to Use
|
|
43
37
|
|
|
44
|
-
|
|
38
|
+
- [Initial Setup](./tutorials/For%20Developers.md#_initial-setup_)
|
|
39
|
+
- [Installation](./tutorials/For%20Developers.md#installation)
|
|
40
|
+
- [Scripts](./tutorials/For%20Developers.md#scripts)
|
|
41
|
+
- [Linting](./tutorials/For%20Developers.md#testing)
|
|
42
|
+
- [CI/CD](./tutorials/For%20Developers.md#continuous-integrationdeployment)
|
|
43
|
+
- [Publishing](./tutorials/For%20Developers.md#publishing)
|
|
44
|
+
- [Structure](./tutorials/For%20Developers.md#repository-structure)
|
|
45
|
+
- [IDE Integrations](./tutorials/For%20Developers.md#ide-integrations)
|
|
46
|
+
- [VSCode(ium)](./tutorials/For%20Developers.md#visual-studio-code-vscode)
|
|
47
|
+
- [WebStorm](./tutorials/For%20Developers.md#webstorm)
|
|
48
|
+
- [Considerations](./tutorials/For%20Developers.md#considerations)
|
|
45
49
|
|
|
46
|
-
create a new project using this one as a template.
|
|
47
50
|
|
|
48
|
-
clone it `git clone <project>` and navigate to the root folder `cd <project>`
|
|
49
51
|
|
|
50
|
-
#### If your project has private dependencies or publishes to private npm registries, create an `.npmrc` containing:
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
@<scope1>:registry=https://<ADDRESS>.com/api/v4/packages/npm/
|
|
54
|
-
@<scope2>:registry=https://<ADDRESS>.<DOMAIN>.com/api/v4/packages/npm/
|
|
55
|
-
//<ADDRESS>.<DOMAIN>.com/:_authToken=${TOKEN}
|
|
56
|
-
//<ADDRESS>.<DOMAIN>.com/api/v4/groups/<GROUP_ID>/packages/npm/:_authToken=${TOKEN}
|
|
57
|
-
//<ADDRESS>.<DOMAIN>.com/api/v4/projects/<PROJECT_ID>/packages/npm/:_authToken=${TOKEN}
|
|
58
|
-
```
|
|
53
|
+
### Related
|
|
59
54
|
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
[](https://github.com/decaf-ts/decaf-ts)
|
|
56
|
+
[](https://github.com/decaf-ts/for-nano)
|
|
57
|
+
[](https://github.com/decaf-ts/for-couchdb)
|
|
58
|
+
[](https://github.com/decaf-ts/core)
|
|
59
|
+
[](https://github.com/decaf-ts/decorator-validation)
|
|
60
|
+
[](https://github.com/decaf-ts/db-decorators)
|
|
65
61
|
|
|
66
|
-
and adding a `.token` file containing your access token to the private registries na repositories.
|
|
67
62
|
|
|
68
|
-
###
|
|
63
|
+
### Social
|
|
64
|
+
|
|
65
|
+
[](https://www.linkedin.com/in/decaf-ts/)
|
|
69
66
|
|
|
70
|
-
Run `npm install` (or `npm run do-install` if you have private dependencies and a `.token` file) to install the dependencies:
|
|
71
67
|
|
|
72
|
-
If this is the first time you are running this command it will also:
|
|
73
|
-
- update this repository's dependencies to their latest version;
|
|
74
|
-
- creates a `.token` file which you can leave empty unless you have private dependencies or publish to private registries
|
|
75
|
-
- delete this 'first run script' file and npm call from the `package.json`;
|
|
76
|
-
- try to commit the updated `package.json` and deleted files (having ssh access helps here);
|
|
77
|
-
## Linting
|
|
78
|
-
|
|
79
|
-
This repo comes with eslint + prettier preconfigured to the default standards
|
|
80
|
-
## Testing
|
|
81
|
-
|
|
82
|
-
Preconfigured Jest based testing:
|
|
83
|
-
|
|
84
|
-
- unit tests under the `tests/unit` folder;
|
|
85
|
-
- include a default bundle test (helps with circular dependencies and such);
|
|
86
|
-
- integration tests under the `tests/integration` folder;
|
|
87
|
-
- stores converage results under `workdocs/coverage`;
|
|
88
|
-
- publishes coverage result to docs;
|
|
89
|
-
- ignores `cli.ts` from coverage since that is an executable file;
|
|
90
|
-
- defines the coverage threshold in `jest.config.ts`;
|
|
91
|
-
### Releases
|
|
92
|
-
|
|
93
|
-
This repository automates releases in the following manner:
|
|
94
|
-
|
|
95
|
-
- run `npm run release -- <major|minor|patch|version> <message>`:
|
|
96
|
-
- if arguments are missing you will be prompted for them;
|
|
97
|
-
- it will run `npm run prepare-release` npm script;
|
|
98
|
-
- it will commit all changes;
|
|
99
|
-
- it will push the new tag;
|
|
100
|
-
|
|
101
|
-
If publishing to a private repo's npm registry, make sure you add to your `package.json`:
|
|
102
|
-
|
|
103
|
-
```json
|
|
104
|
-
{
|
|
105
|
-
"publishConfig": {
|
|
106
|
-
"<SCOPE>:registry": " https://<REGISTRY>/api/v4/projects/<PROJECT_ID>/packages/npm/"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Where:
|
|
112
|
-
|
|
113
|
-
- `<SCOPE>` - Is the scope of your package;
|
|
114
|
-
- `<REGISTRY>` - your registry host;
|
|
115
|
-
- `<PROJECT_ID>` - you project ID number (easy to grab via UI in gitlab or by
|
|
116
|
-
running `$("meta[name=octolytics-dimension-repository_id]").getAttribute('content')` in the repository page in github)
|
|
117
|
-
;
|
|
118
|
-
|
|
119
|
-
### Publishing
|
|
120
|
-
|
|
121
|
-
Unless the `-no-ci` flag is passed in the commit message to the `npm run release` command, publishing will be handled
|
|
122
|
-
automatically by github/gitlab (triggered by the tag).
|
|
123
|
-
|
|
124
|
-
When the `-no-ci` flag is passed then you can:
|
|
125
|
-
|
|
126
|
-
- run `npm run publish`. This command assumes :
|
|
127
|
-
- you have previously run the `npm run release`;
|
|
128
|
-
- you have you publishing properly configured in `npmrc` and `package.json`;
|
|
129
|
-
- The token for any special access required is stored in the `.token` file;
|
|
130
|
-
|
|
131
|
-
## Continuous Integration/Deployment
|
|
132
|
-
|
|
133
|
-
While the implementationfor gitlab and github are not perfectly matched, they are perfectly usable.
|
|
134
|
-
|
|
135
|
-
The template comes with ci/cd for :
|
|
136
|
-
- gitlab (with caching for performance):
|
|
137
|
-
- stages:
|
|
138
|
-
- dependencies: Installs dependencies (on `package-lock.json` changes, caches node modules);
|
|
139
|
-
- build: builds the code (on `src/*` changes, caches `lib` and `dist`);
|
|
140
|
-
- test: tests the code (on `src/*`, `test/*` changes, caches `workdocs/{resources, badges, coverage}`);
|
|
141
|
-
- deploy:
|
|
142
|
-
- deploys to package registry on a tag (public|private);
|
|
143
|
-
- deploys docker image to docker registry (private);
|
|
144
|
-
- Deploys the documentation to the repository pages;
|
|
145
|
-
- github:
|
|
146
|
-
- jest-test: standard `install -> build -> test` loop;
|
|
147
|
-
- jest-coverage: extracts coverage from the tests;
|
|
148
|
-
- codeql-analysis: Code quality analisys;
|
|
149
|
-
- pages: builds the documentation and deploys to github pages
|
|
150
|
-
- release-on-tag: issues a release when the tag does not contain `-no-ci` string
|
|
151
|
-
- publish-on-release: publishes to package registry when the tag does not contain the `-no-ci` string
|
|
152
|
-
- Requires Variables:
|
|
153
|
-
- CONSECUTIVE_ACTION_TRIGGER: secret to enable actions to trigger other actions;
|
|
154
|
-
- NPM_TOKEN: npm/docker registry token
|
|
155
|
-
## Considerations
|
|
156
|
-
- Setup for a linux based environment (Sorry windows users. use WSL... or just change already);
|
|
157
|
-
- Setup for node 20, but will work at least with 16;
|
|
158
|
-
- Requires docker to build documentation (drawings and PlantUML)
|
|
159
|
-
## Documentation
|
|
160
|
-
|
|
161
|
-
The repository proposes a way to generate documentation that while still not ideal, produces verys consitest results.
|
|
162
|
-
|
|
163
|
-
In the code you see an example on how to properly document each code object, but the overall structure is:
|
|
164
|
-
- each package is a `@module`;
|
|
165
|
-
- Classes and Interfaces are categorized into `@category` and `@subcategory`;
|
|
166
|
-
- All other objects are categorized by `@namespace` and `@memberOf`;
|
|
167
|
-
- Enums and const are declared as `@const` and both must describe their properties as `@property` (when constants are objects);
|
|
168
|
-
- Interfaces must declare their methods `@method`;
|
|
169
|
-
|
|
170
|
-
There are 3 steps the generating the documentation (automated in CI):
|
|
171
|
-
- `npm run drawings` - generates png files from each drawing in the `workdocs/drawings` folder and moves them to the `workdocs/resources` folder (requires Docker);
|
|
172
|
-
- `npm run uml` - generates png files from each PlantUML diagram in the `workdocs/uml` folder and moves them to the `workdocs/resources` folder (requires Docker);
|
|
173
|
-
- `npm run docs` - this has several stages, defined under the `gulp docs` (gulpfile.js):
|
|
174
|
-
- compiles the Readme file via md compile:
|
|
175
|
-
- enables keeping separate files for sections that are then joined into a single file;
|
|
176
|
-
- Allows keeping specific files in the jsdocs tutorial folder so they show up on their own menu;
|
|
177
|
-
- compiles the documentation from the source code using jsdocs:
|
|
178
|
-
- uses the better docs template with the category and component plugins
|
|
179
|
-
- uses the mermaid jsdoc plugin to embue uml diagrams in the docs
|
|
180
|
-
- includes a nav link to the test coverage results;
|
|
181
|
-
- copies the jsdoc and mds to `/docs`;
|
|
182
|
-
- copies the `./workdocs/{drawings, uml, assets, resources}` to `./docs`;
|
|
183
|
-
|
|
184
|
-
The produced `docs` folder contains the resulting documentation;
|
|
185
|
-
### Related
|
|
186
68
|
|
|
187
|
-
[](https://github.com/decaf-ts/ts-workspace)
|
|
188
|
-
### Social
|
|
189
69
|
|
|
190
|
-
|
|
191
|
-
### Scripts
|
|
192
|
-
|
|
193
|
-
The following npm scripts are available for development:
|
|
194
|
-
|
|
195
|
-
- `preinstall` - will run only on the first install to trigger the dep update. will self delete;
|
|
196
|
-
- `do-install` - sets a `TOKEN` environment variable to the contents of `.token` and runs npm install (useful when you
|
|
197
|
-
have private dependencies);
|
|
198
|
-
- `flash-forward` - updates all dependencies. Take care, This may not be desirable is some cases;
|
|
199
|
-
- `reset` - updates all dependencies. Take care, This may not be desirable is some cases;
|
|
200
|
-
- `build` - builds the code (via gulp `gulpfile.js`) in development mode (generates `lib` and `dist` folder);
|
|
201
|
-
- `build:prod` - builds the code (via gulp `gulpfile.js`) in production mode (generates `lib` and `dist` folder);
|
|
202
|
-
- `test` - runs unit tests;
|
|
203
|
-
- `test:integration` - runs it tests;
|
|
204
|
-
- `test:all` - runs all tests;
|
|
205
|
-
- `lint` - runs es lint on the code folder;
|
|
206
|
-
- `lint-fix` - tries to auto-fix the code folder;
|
|
207
|
-
- `prepare-release` - defines the commands to run prior to a new tag (defaults to linting, building production code,
|
|
208
|
-
running tests and documentation generation);
|
|
209
|
-
- `release` - triggers a new tag being pushed to master (via `./bin/tag_release.sh`);
|
|
210
|
-
- `clean-publish` - cleans the package.json for publishing;
|
|
211
|
-
- `coverage` - runs all test, calculates coverage and generates badges for readme;
|
|
212
|
-
- `drawings` - compiles all DrawIO `*.drawio` files in the `workdocs/drawings` folder to png and moves them to
|
|
213
|
-
the `workdocs/resources` folder;
|
|
214
|
-
- `uml` - compiles all PlantUML `*.puml` files in the `workdocs/uml` folder to png and moves them to
|
|
215
|
-
the `workdocs/resources` folder;
|
|
216
|
-
- `docs` - compiles all the coverage, drawings, uml, jsdocs and md docs into a readable web page under `./docs`;
|
|
217
|
-
|
|
218
|
-
### Repository Structure
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
ts-workspace
|
|
222
|
-
│
|
|
223
|
-
│ .gitignore <-- Defines files ignored to git
|
|
224
|
-
│ .npmignore <-- Defines files ignored by npm
|
|
225
|
-
│ .nmprc <-- Defines the Npm registry for this package
|
|
226
|
-
│ .eslintrc.cjs <-- linting for the project
|
|
227
|
-
│ .prettier.config.cjs <-- Code style for the project
|
|
228
|
-
│ .gitlab-ci.yml <-- Gillab CI/CD file
|
|
229
|
-
│ gulpfile.js <-- Gulp build scripts. used for building na other features (eg docs)
|
|
230
|
-
│ jest.config.ts <-- Tests Configuration file
|
|
231
|
-
│ mdCompile.json <-- md Documentation generation configuration file
|
|
232
|
-
│ jsdocs.json <-- jsdoc Documentation generation configuration file
|
|
233
|
-
│ Dockerfile <-- minimal example of a node service Dockerfile
|
|
234
|
-
│ LICENCE.md <-- Licence disclamer
|
|
235
|
-
│ package.json
|
|
236
|
-
│ package-lock.json
|
|
237
|
-
│ README.md <-- Readme File dynamically compiled from 'workdocs' via the 'docs' npm script
|
|
238
|
-
│ tsconfig.json <-- Typescript config file. Is overriden in 'gulpfile.js'
|
|
239
|
-
│
|
|
240
|
-
└───bin
|
|
241
|
-
│ │ tag_release.sh <-- Script to help with releases
|
|
242
|
-
│
|
|
243
|
-
└───docs
|
|
244
|
-
│ │ ... <-- Dinamically generated folder, containing the compiled documentation for this repository. generated via the 'docs' npm script
|
|
245
|
-
│
|
|
246
|
-
└───src
|
|
247
|
-
│ │ ... <-- Source code for this repository
|
|
248
|
-
│
|
|
249
|
-
└───tests
|
|
250
|
-
│ │───unit <-- Unit tests
|
|
251
|
-
│ └───integration <-- Integration tests
|
|
252
|
-
│
|
|
253
|
-
└───workdocs <-- Folder with all pre-compiled documentation
|
|
254
|
-
│ │───assets <-- Documentation asset folder
|
|
255
|
-
│ │───badges <-- Auto generated coverage badges folder
|
|
256
|
-
│ │───coverage <-- Auto generated coverage results
|
|
257
|
-
│ │───drawings <-- DrawIO folder. Drawings (*.drawio) here will be processed to generate documentation (requires docker)
|
|
258
|
-
│ │───uml <-- PlantUML folder. Diagrams (*.puml) here will be processed to generate documentation (requires docker)
|
|
259
|
-
│ │───tutorials <-- Tutorial folder
|
|
260
|
-
│ │ ... <-- Categorized *.md files that are merged to generate the final readme (via md compile)
|
|
261
|
-
│ │ Readme.md <-- Entry point to the README.md
|
|
262
|
-
│
|
|
263
|
-
└───dist
|
|
264
|
-
│ │ ... <-- Dinamically generated folder containing the bundles for distribution
|
|
265
|
-
│
|
|
266
|
-
└───lib
|
|
267
|
-
| ... <-- Dinamically generated folder containing the compiled code
|
|
268
|
-
```
|
|
70
|
+
#### Languages
|
|
269
71
|
|
|
270
72
|

|
|
271
73
|

|
|
@@ -284,14 +86,12 @@ I am grateful for any contributions made to this project. Please read [this](./w
|
|
|
284
86
|
|
|
285
87
|
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.
|
|
286
88
|
|
|
287
|
-
Financial support is always welcome and helps keep
|
|
89
|
+
Financial support is always welcome and helps keep both me and the project alive and healthy.
|
|
288
90
|
|
|
289
91
|
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.
|
|
290
92
|
|
|
291
93
|
## License
|
|
292
94
|
|
|
293
|
-
This project is released under the [MIT License](LICENSE.md).
|
|
294
|
-
|
|
295
|
-
#### Disclaimer:
|
|
95
|
+
This project is released under the [MIT License](./LICENSE.md).
|
|
296
96
|
|
|
297
|
-
|
|
97
|
+
By developers, for developers...
|