@decaf-ts/for-couchdb 0.3.14 → 0.3.15

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.
Files changed (86) hide show
  1. package/LICENSE.md +159 -16
  2. package/README.md +20 -2
  3. package/dist/for-couchdb.cjs +2 -1450
  4. package/dist/for-couchdb.cjs.map +1 -0
  5. package/dist/for-couchdb.js +2 -0
  6. package/dist/for-couchdb.js.map +1 -0
  7. package/lib/adapter.cjs +1 -1
  8. package/lib/adapter.js.map +1 -0
  9. package/lib/constants.cjs +1 -1
  10. package/lib/constants.js.map +1 -0
  11. package/lib/errors.cjs +1 -1
  12. package/lib/errors.js.map +1 -0
  13. package/lib/esm/adapter.js +1 -1
  14. package/lib/esm/adapter.js.map +1 -0
  15. package/lib/esm/constants.js +1 -1
  16. package/lib/esm/constants.js.map +1 -0
  17. package/lib/esm/errors.js +1 -1
  18. package/lib/esm/errors.js.map +1 -0
  19. package/lib/esm/index.d.ts +1 -1
  20. package/lib/esm/index.js +2 -2
  21. package/lib/esm/index.js.map +1 -0
  22. package/lib/esm/indexes/generator.js +1 -1
  23. package/lib/esm/indexes/generator.js.map +1 -0
  24. package/lib/esm/indexes/index.js +1 -1
  25. package/lib/esm/indexes/index.js.map +1 -0
  26. package/lib/esm/interfaces/CouchDBRepository.js +1 -1
  27. package/lib/esm/interfaces/CouchDBRepository.js.map +1 -0
  28. package/lib/esm/interfaces/index.js +1 -1
  29. package/lib/esm/interfaces/index.js.map +1 -0
  30. package/lib/esm/model/CouchDBSequence.js +1 -1
  31. package/lib/esm/model/CouchDBSequence.js.map +1 -0
  32. package/lib/esm/model/index.js +1 -1
  33. package/lib/esm/model/index.js.map +1 -0
  34. package/lib/esm/query/Paginator.js +1 -1
  35. package/lib/esm/query/Paginator.js.map +1 -0
  36. package/lib/esm/query/Statement.js +1 -1
  37. package/lib/esm/query/Statement.js.map +1 -0
  38. package/lib/esm/query/constants.js +1 -1
  39. package/lib/esm/query/constants.js.map +1 -0
  40. package/lib/esm/query/index.js +1 -1
  41. package/lib/esm/query/index.js.map +1 -0
  42. package/lib/esm/query/translate.js +1 -1
  43. package/lib/esm/query/translate.js.map +1 -0
  44. package/lib/esm/sequences/Sequence.js +1 -1
  45. package/lib/esm/sequences/Sequence.js.map +1 -0
  46. package/lib/esm/sequences/index.js +1 -1
  47. package/lib/esm/sequences/index.js.map +1 -0
  48. package/lib/esm/types.js +1 -1
  49. package/lib/esm/types.js.map +1 -0
  50. package/lib/esm/utils.js +1 -1
  51. package/lib/esm/utils.js.map +1 -0
  52. package/lib/index.cjs +2 -2
  53. package/lib/index.d.ts +1 -1
  54. package/lib/index.js.map +1 -0
  55. package/lib/indexes/generator.cjs +1 -1
  56. package/lib/indexes/generator.js.map +1 -0
  57. package/lib/indexes/index.cjs +1 -1
  58. package/lib/indexes/index.js.map +1 -0
  59. package/lib/interfaces/CouchDBRepository.cjs +1 -1
  60. package/lib/interfaces/CouchDBRepository.js.map +1 -0
  61. package/lib/interfaces/index.cjs +1 -1
  62. package/lib/interfaces/index.js.map +1 -0
  63. package/lib/model/CouchDBSequence.cjs +1 -1
  64. package/lib/model/CouchDBSequence.js.map +1 -0
  65. package/lib/model/index.cjs +1 -1
  66. package/lib/model/index.js.map +1 -0
  67. package/lib/query/Paginator.cjs +1 -1
  68. package/lib/query/Paginator.js.map +1 -0
  69. package/lib/query/Statement.cjs +1 -1
  70. package/lib/query/Statement.js.map +1 -0
  71. package/lib/query/constants.cjs +1 -1
  72. package/lib/query/constants.js.map +1 -0
  73. package/lib/query/index.cjs +1 -1
  74. package/lib/query/index.js.map +1 -0
  75. package/lib/query/translate.cjs +1 -1
  76. package/lib/query/translate.js.map +1 -0
  77. package/lib/sequences/Sequence.cjs +1 -1
  78. package/lib/sequences/Sequence.js.map +1 -0
  79. package/lib/sequences/index.cjs +1 -1
  80. package/lib/sequences/index.js.map +1 -0
  81. package/lib/types.cjs +1 -1
  82. package/lib/types.js.map +1 -0
  83. package/lib/utils.cjs +1 -1
  84. package/lib/utils.js.map +1 -0
  85. package/package.json +11 -21
  86. package/dist/for-couchdb.esm.cjs +0 -1430
package/LICENSE.md CHANGED
@@ -1,22 +1,165 @@
1
- MIT License
1
+ Mozilla Public License Version 2.0
2
2
 
3
3
  Copyright (c) 2025 Tiago Venceslau and Contributors
4
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:
5
+ 1. Definitions
11
6
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
7
+ "Contributor"
8
+ means each individual or legal entity that creates, contributes to the
9
+ creation of, or owns Covered Software.
14
10
 
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.
11
+ "Contributor Version"
12
+ means the combination of the Contributions of others (if any) used by a
13
+ Contributor and that particular Contributor's Contribution.
22
14
 
15
+ "Covered Software"
16
+ means Source Code Form to which the initial Contributor has attached the
17
+ notice in Exhibit A, the executables produced from that Source Code Form,
18
+ and modifications of such Source Code Form, in each case including the
19
+ files distributed with such Source Code Form.
20
+
21
+ "Incompatible With Secondary Licenses"
22
+ means that the initial Contributor has attached the notice described in
23
+ Exhibit B to the Covered Software; the covered software is therefore
24
+ governed by the terms of this license without the option for the
25
+ additional permissions of a Secondary License.
26
+
27
+ "License"
28
+ means this document.
29
+
30
+ "Licensable"
31
+ means having the right to grant, to the maximum extent possible, whether
32
+ at the time of the making or afterwards, any and all of the rights conveyed
33
+ by this License.
34
+
35
+ "Modifications"
36
+ means any addition to or deletion from the contents of Covered Software
37
+ or any new file that contains any Covered Software.
38
+
39
+ "Patent Claims"
40
+ means any patent claim(s), now owned or hereafter acquired, including
41
+ without limitation, method, process, and apparatus claims, in any patent
42
+ Licensable by grantor.
43
+
44
+ "Secondary License"
45
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
46
+ General Public License, Version 2.1, or any subsequent versions of those
47
+ licenses that are designated as a Secondary License.
48
+
49
+ "Source Code Form"
50
+ means the form of the work preferred for making modifications.
51
+
52
+ "You" (or "Your")
53
+ means an individual or a legal entity exercising rights under, and
54
+ complying with all of the terms of, this License. For legal entities,
55
+ "You" includes any entity that controls, is controlled by, or is under
56
+ common control with You. For purposes of this definition, "control"
57
+ means (a) the power, direct or indirect, to cause the direction or
58
+ management of such entity, whether by contract or otherwise, or (b)
59
+ ownership of more than fifty percent (50%) of the outstanding shares or
60
+ beneficial ownership of such entity.
61
+
62
+ 2. License Grants and Conditions
63
+
64
+ Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive
65
+ license:
66
+
67
+ a. under intellectual property rights (other than patent or trademark)
68
+ Licensable by such Contributor to use, reproduce, make available,
69
+ modify, display, perform, distribute, and otherwise exploit its
70
+ Contributions, either on an exclusive or non-exclusive basis; and
71
+
72
+ b. under Patent Claims infringed by the making, using, or selling of
73
+ Contributions made by that Contributor alone or jointly with others;
74
+ provided that You agree to the terms of this License.
75
+
76
+ This license does not grant any rights in the trademarks, service marks, or
77
+ logos of any Contributor (except as may be necessary to comply with the
78
+ notice requirements in Section 3.4).
79
+
80
+ 3. Distribution Obligations
81
+
82
+ 3.1. Distribution of Source Form
83
+
84
+ All distribution of Covered Software in Source Code Form, including any
85
+ Modifications that You create or to which You contribute, must be made under
86
+ this License. You must inform recipients that the Source Code Form of the
87
+ Covered Software is governed by the terms of this License, and include a copy
88
+ of this License in or with the Source Code Form.
89
+
90
+ 3.2. Distribution of Executable Form
91
+
92
+ If You distribute Covered Software in Executable Form then:
93
+
94
+ a. such Covered Software must also be made available in Source Code Form,
95
+ as described in Section 3.1, and You must inform recipients of the
96
+ Executable Form how to obtain a complete copy of the corresponding
97
+ Source Code Form in a reasonable manner on or through a medium customarily
98
+ used for software exchange; and
99
+
100
+ b. You may distribute the Executable Form under terms of Your choice,
101
+ provided that You do not attempt to limit or alter the recipients'
102
+ rights in the Source Code Form under this License; and that You do
103
+ not add any further restrictions to the rights granted by this License.
104
+
105
+ 3.3. Distribution of a Larger Work
106
+
107
+ You may create and distribute a work that combines Covered Software with
108
+ other material, and distribute the resulting work as a single product. In
109
+ order to do so, you must ensure the terms of this License are maintained for
110
+ any Covered Software contained within the Larger Work. If the Larger Work is
111
+ distributed in Executable Form containing Covered Software, then the Source
112
+ Code Form containing the Covered Software must be made available under the
113
+ terms of this License, and You must ensure the license notice described in
114
+ Exhibit A is included with the Source Code Form.
115
+
116
+ 3.4. Notices
117
+
118
+ You must cause each file that you distribute containing Covered Software to
119
+ carry a legal notice stating that you have changed the file (if you have) and
120
+ including at least the ownership and license notice required by Exhibit A.
121
+
122
+ 4. Incompatible With Secondary Licenses
123
+
124
+ If the Covered Software is made available under the terms of this License and
125
+ also made available under the terms of a Secondary License, then the terms of
126
+ the Secondary License apply to the Covered Software insofar as the Secondary
127
+ License grants additional permissions. If the Covered Software is not made
128
+ available under a Secondary License, then this License fully governs its use.
129
+
130
+ 5. Disclaimer of Warranty
131
+
132
+ Covered Software is provided "as is". Contributors disclaim all warranties
133
+ and conditions, express or implied, including, without limitation, any
134
+ implied warranties of merchantability, fitness for a particular purpose, or
135
+ non-infringement.
136
+
137
+ 6. Limitation of Liability
138
+
139
+ Except to the extent required by applicable law, in no event will any
140
+ Contributor be liable for any damages arising out of or in connection with
141
+ this License or the use or inability to use the Covered Software, even if
142
+ advised of the possibility of such damages.
143
+
144
+ 7. Termination
145
+
146
+ This License will terminate automatically if You fail to comply with its
147
+ terms. However, if you cease all activities that violate the License, then
148
+ any patent license(s) granted by a Contributor which have been terminated
149
+ under this section will automatically reinstate if you resume compliance.
150
+
151
+ 8. Miscellaneous
152
+
153
+ This License represents the complete agreement concerning the subject matter
154
+ hereof. If any provision of this License is held to be unenforceable, that
155
+ provision shall be reformed only to the extent necessary to make it
156
+ enforceable. The headings are for convenience only and do not affect
157
+ interpretation.
158
+
159
+ Exhibit A - Source Code Form License Notice
160
+
161
+ This Source Code Form is subject to the terms of the Mozilla Public License,
162
+ v. 2.0. If a copy of the MPL was not distributed with this file, You can
163
+ obtain one at http://mozilla.org/MPL/2.0/.
164
+
165
+ Copyright (c) 2025 Tiago Venceslau and Contributors
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![Banner](./workdocs/assets/Banner.png)
1
+ ![Banner](./workdocs/assets/decaf-logo.svg)
2
2
 
3
3
  # Decaf CouchDB Module
4
4
 
@@ -415,6 +415,24 @@ const indexName = generateIndexName('email', 'users', ['firstName'], 'asc');
415
415
  ```
416
416
 
417
417
 
418
+ ## Coding Principles
419
+
420
+ - group similar functionality in folders (analog to namespaces but without any namespace declaration)
421
+ - one class per file;
422
+ - one interface per file (unless interface is just used as a type);
423
+ - group types as other interfaces in a types.ts file per folder;
424
+ - group constants or enums in a constants.ts file per folder;
425
+ - group decorators in a decorators.ts file per folder;
426
+ - always import from the specific file, never from a folder or index file (exceptions for dependencies on other packages);
427
+ - prefer the usage of established design patters where applicable:
428
+ - Singleton (can be an anti-pattern. use with care);
429
+ - factory;
430
+ - observer;
431
+ - strategy;
432
+ - builder;
433
+ - etc;
434
+
435
+
418
436
  ### Related
419
437
 
420
438
  [![decaf-ts](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decaf-ts)](https://github.com/decaf-ts/decaf-ts)
@@ -458,6 +476,6 @@ So if you can, if this project in any way. either by learning something or simpl
458
476
 
459
477
  ## License
460
478
 
461
- This project is released under the [MIT License](./LICENSE.md).
479
+ This project is released under the [Mozilla Public License 2.0](./LICENSE.md).
462
480
 
463
481
  By developers, for developers...