@decaf-ts/core 0.3.37 → 0.4.0

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 (314) hide show
  1. package/LICENSE.md +0 -0
  2. package/README.md +37 -243
  3. package/dist/core.cjs +2361 -0
  4. package/dist/core.esm.cjs +2307 -0
  5. package/lib/esm/identity/decorators.d.ts +1 -1
  6. package/lib/esm/identity/decorators.js +1 -2
  7. package/lib/esm/identity/index.d.ts +0 -0
  8. package/lib/esm/identity/index.js +1 -2
  9. package/lib/esm/identity/utils.d.ts +0 -0
  10. package/lib/esm/identity/utils.js +1 -2
  11. package/lib/esm/index.d.ts +1 -1
  12. package/lib/esm/index.js +2 -3
  13. package/lib/esm/interfaces/Builder.d.ts +0 -0
  14. package/lib/esm/interfaces/Builder.js +1 -2
  15. package/lib/esm/interfaces/Executor.d.ts +0 -0
  16. package/lib/esm/interfaces/Executor.js +1 -2
  17. package/lib/esm/interfaces/Observable.d.ts +0 -0
  18. package/lib/esm/interfaces/Observable.js +1 -2
  19. package/lib/esm/interfaces/Observer.d.ts +0 -0
  20. package/lib/esm/interfaces/Observer.js +1 -2
  21. package/lib/esm/interfaces/Paginatable.d.ts +0 -0
  22. package/lib/esm/interfaces/Paginatable.js +1 -2
  23. package/lib/esm/interfaces/Queriable.d.ts +0 -0
  24. package/lib/esm/interfaces/Queriable.js +1 -2
  25. package/lib/esm/interfaces/RawExecutor.d.ts +0 -0
  26. package/lib/esm/interfaces/RawExecutor.js +1 -2
  27. package/lib/esm/interfaces/SequenceOptions.d.ts +0 -0
  28. package/lib/esm/interfaces/SequenceOptions.js +1 -2
  29. package/lib/esm/interfaces/index.d.ts +0 -0
  30. package/lib/esm/interfaces/index.js +1 -2
  31. package/lib/esm/model/BaseModel.d.ts +0 -0
  32. package/lib/esm/model/BaseModel.js +1 -2
  33. package/lib/esm/model/IdentifiedBaseModel.d.ts +0 -0
  34. package/lib/esm/model/IdentifiedBaseModel.js +1 -2
  35. package/lib/esm/model/User.d.ts +2 -1
  36. package/lib/esm/model/User.js +1 -2
  37. package/lib/esm/model/construction.d.ts +1 -1
  38. package/lib/esm/model/construction.js +1 -2
  39. package/lib/esm/model/decorators.d.ts +0 -0
  40. package/lib/esm/model/decorators.js +1 -2
  41. package/lib/esm/model/index.d.ts +0 -0
  42. package/lib/esm/model/index.js +1 -2
  43. package/lib/esm/model/types.d.ts +0 -0
  44. package/lib/esm/model/types.js +1 -2
  45. package/lib/esm/persistence/Adapter.d.ts +0 -0
  46. package/lib/esm/persistence/Adapter.js +1 -2
  47. package/lib/esm/persistence/Sequence.d.ts +0 -0
  48. package/lib/esm/persistence/Sequence.js +1 -2
  49. package/lib/esm/persistence/constants.d.ts +0 -0
  50. package/lib/esm/persistence/constants.js +1 -2
  51. package/lib/esm/persistence/decorators.d.ts +0 -0
  52. package/lib/esm/persistence/decorators.js +1 -2
  53. package/lib/esm/persistence/errors.d.ts +0 -0
  54. package/lib/esm/persistence/errors.js +1 -2
  55. package/lib/esm/persistence/index.d.ts +0 -0
  56. package/lib/esm/persistence/index.js +1 -2
  57. package/lib/esm/query/Clause.d.ts +0 -0
  58. package/lib/esm/query/Clause.js +1 -2
  59. package/lib/esm/query/ClauseFactory.d.ts +0 -0
  60. package/lib/esm/query/ClauseFactory.js +1 -2
  61. package/lib/esm/query/Condition.d.ts +0 -0
  62. package/lib/esm/query/Condition.js +1 -2
  63. package/lib/esm/query/Paginator.d.ts +0 -0
  64. package/lib/esm/query/Paginator.js +1 -2
  65. package/lib/esm/query/Query.d.ts +0 -0
  66. package/lib/esm/query/Query.js +1 -2
  67. package/lib/esm/query/Statement.d.ts +2 -1
  68. package/lib/esm/query/Statement.js +1 -2
  69. package/lib/esm/query/clauses/FromClause.d.ts +0 -0
  70. package/lib/esm/query/clauses/FromClause.js +1 -2
  71. package/lib/esm/query/clauses/GroupByClause.d.ts +0 -0
  72. package/lib/esm/query/clauses/GroupByClause.js +1 -2
  73. package/lib/esm/query/clauses/InsertClause.d.ts +0 -0
  74. package/lib/esm/query/clauses/InsertClause.js +1 -2
  75. package/lib/esm/query/clauses/LimitClause.d.ts +0 -0
  76. package/lib/esm/query/clauses/LimitClause.js +1 -2
  77. package/lib/esm/query/clauses/OffsetClause.d.ts +0 -0
  78. package/lib/esm/query/clauses/OffsetClause.js +1 -2
  79. package/lib/esm/query/clauses/OrderByClause.d.ts +0 -0
  80. package/lib/esm/query/clauses/OrderByClause.js +1 -2
  81. package/lib/esm/query/clauses/SelectClause.d.ts +0 -0
  82. package/lib/esm/query/clauses/SelectClause.js +1 -2
  83. package/lib/esm/query/clauses/SelectorBasedClause.d.ts +0 -0
  84. package/lib/esm/query/clauses/SelectorBasedClause.js +1 -2
  85. package/lib/esm/query/clauses/ValuesClause.d.ts +0 -0
  86. package/lib/esm/query/clauses/ValuesClause.js +1 -2
  87. package/lib/esm/query/clauses/WhereClause.d.ts +0 -0
  88. package/lib/esm/query/clauses/WhereClause.js +71 -0
  89. package/lib/esm/query/clauses/index.d.ts +0 -0
  90. package/lib/esm/query/clauses/index.js +11 -0
  91. package/lib/esm/query/constants.d.ts +0 -0
  92. package/lib/esm/query/constants.js +1 -2
  93. package/lib/esm/query/errors.d.ts +0 -0
  94. package/lib/esm/query/errors.js +1 -2
  95. package/lib/esm/query/index.d.ts +0 -0
  96. package/lib/esm/query/index.js +1 -2
  97. package/lib/esm/query/options.d.ts +0 -0
  98. package/lib/esm/query/options.js +1 -2
  99. package/lib/esm/query/selectors.d.ts +0 -0
  100. package/lib/esm/query/selectors.js +1 -2
  101. package/lib/esm/query/types.d.ts +0 -0
  102. package/lib/esm/query/types.js +1 -2
  103. package/lib/esm/repository/Context.d.ts +0 -0
  104. package/lib/esm/repository/Context.js +1 -2
  105. package/lib/esm/repository/Repository.d.ts +0 -0
  106. package/lib/esm/repository/Repository.js +1 -2
  107. package/lib/esm/repository/constants.d.ts +0 -0
  108. package/lib/esm/repository/constants.js +1 -2
  109. package/lib/esm/repository/decorators.d.ts +0 -0
  110. package/lib/esm/repository/decorators.js +1 -2
  111. package/lib/esm/repository/errors.d.ts +0 -0
  112. package/lib/esm/repository/errors.js +1 -2
  113. package/lib/esm/repository/index.d.ts +0 -0
  114. package/lib/esm/repository/index.js +1 -2
  115. package/lib/esm/repository/injectables.d.ts +0 -0
  116. package/lib/esm/repository/injectables.js +1 -2
  117. package/lib/esm/repository/types.d.ts +0 -0
  118. package/lib/esm/repository/types.js +1 -2
  119. package/lib/esm/repository/utils.d.ts +0 -0
  120. package/lib/esm/repository/utils.js +1 -2
  121. package/lib/esm/validators/ClauseSequenceValidator.d.ts +3 -3
  122. package/lib/esm/validators/ClauseSequenceValidator.js +8 -9
  123. package/lib/esm/validators/decorators.d.ts +0 -0
  124. package/lib/esm/validators/decorators.js +1 -2
  125. package/lib/esm/validators/index.d.ts +0 -0
  126. package/lib/esm/validators/index.js +1 -2
  127. package/lib/identity/decorators.cjs +1 -0
  128. package/lib/identity/decorators.d.ts +1 -1
  129. package/lib/identity/index.cjs +1 -0
  130. package/lib/identity/index.d.ts +0 -0
  131. package/lib/identity/utils.cjs +1 -0
  132. package/lib/identity/utils.d.ts +0 -0
  133. package/lib/index.cjs +2 -1
  134. package/lib/index.d.ts +1 -1
  135. package/lib/interfaces/Builder.cjs +1 -0
  136. package/lib/interfaces/Builder.d.ts +0 -0
  137. package/lib/interfaces/Executor.cjs +1 -0
  138. package/lib/interfaces/Executor.d.ts +0 -0
  139. package/lib/interfaces/Observable.cjs +1 -0
  140. package/lib/interfaces/Observable.d.ts +0 -0
  141. package/lib/interfaces/Observer.cjs +1 -0
  142. package/lib/interfaces/Observer.d.ts +0 -0
  143. package/lib/interfaces/Paginatable.cjs +1 -0
  144. package/lib/interfaces/Paginatable.d.ts +0 -0
  145. package/lib/interfaces/Queriable.cjs +1 -0
  146. package/lib/interfaces/Queriable.d.ts +0 -0
  147. package/lib/interfaces/RawExecutor.cjs +1 -0
  148. package/lib/interfaces/RawExecutor.d.ts +0 -0
  149. package/lib/interfaces/SequenceOptions.cjs +1 -0
  150. package/lib/interfaces/SequenceOptions.d.ts +0 -0
  151. package/lib/interfaces/index.cjs +1 -0
  152. package/lib/interfaces/index.d.ts +0 -0
  153. package/lib/model/BaseModel.cjs +1 -0
  154. package/lib/model/BaseModel.d.ts +0 -0
  155. package/lib/model/IdentifiedBaseModel.cjs +1 -0
  156. package/lib/model/IdentifiedBaseModel.d.ts +0 -0
  157. package/lib/model/User.cjs +1 -0
  158. package/lib/model/User.d.ts +2 -1
  159. package/lib/model/construction.cjs +1 -0
  160. package/lib/model/construction.d.ts +1 -1
  161. package/lib/model/decorators.cjs +1 -0
  162. package/lib/model/decorators.d.ts +0 -0
  163. package/lib/model/index.cjs +1 -0
  164. package/lib/model/index.d.ts +0 -0
  165. package/lib/model/types.cjs +1 -0
  166. package/lib/model/types.d.ts +0 -0
  167. package/lib/persistence/Adapter.cjs +1 -0
  168. package/lib/persistence/Adapter.d.ts +0 -0
  169. package/lib/persistence/Sequence.cjs +1 -0
  170. package/lib/persistence/Sequence.d.ts +0 -0
  171. package/lib/persistence/constants.cjs +1 -0
  172. package/lib/persistence/constants.d.ts +0 -0
  173. package/lib/persistence/decorators.cjs +1 -0
  174. package/lib/persistence/decorators.d.ts +0 -0
  175. package/lib/persistence/errors.cjs +1 -0
  176. package/lib/persistence/errors.d.ts +0 -0
  177. package/lib/persistence/index.cjs +1 -0
  178. package/lib/persistence/index.d.ts +0 -0
  179. package/lib/query/Clause.cjs +1 -0
  180. package/lib/query/Clause.d.ts +0 -0
  181. package/lib/query/ClauseFactory.cjs +1 -0
  182. package/lib/query/ClauseFactory.d.ts +0 -0
  183. package/lib/query/Condition.cjs +1 -0
  184. package/lib/query/Condition.d.ts +0 -0
  185. package/lib/query/Paginator.cjs +1 -0
  186. package/lib/query/Paginator.d.ts +0 -0
  187. package/lib/query/Query.cjs +1 -0
  188. package/lib/query/Query.d.ts +0 -0
  189. package/lib/query/Statement.cjs +1 -0
  190. package/lib/query/Statement.d.ts +2 -1
  191. package/lib/query/clauses/FromClause.cjs +1 -0
  192. package/lib/query/clauses/FromClause.d.ts +0 -0
  193. package/lib/query/clauses/GroupByClause.cjs +1 -0
  194. package/lib/query/clauses/GroupByClause.d.ts +0 -0
  195. package/lib/query/clauses/InsertClause.cjs +1 -0
  196. package/lib/query/clauses/InsertClause.d.ts +0 -0
  197. package/lib/query/clauses/LimitClause.cjs +1 -0
  198. package/lib/query/clauses/LimitClause.d.ts +0 -0
  199. package/lib/query/clauses/OffsetClause.cjs +1 -0
  200. package/lib/query/clauses/OffsetClause.d.ts +0 -0
  201. package/lib/query/clauses/OrderByClause.cjs +1 -0
  202. package/lib/query/clauses/OrderByClause.d.ts +0 -0
  203. package/lib/query/clauses/SelectClause.cjs +1 -0
  204. package/lib/query/clauses/SelectClause.d.ts +0 -0
  205. package/lib/query/clauses/SelectorBasedClause.cjs +1 -0
  206. package/lib/query/clauses/SelectorBasedClause.d.ts +0 -0
  207. package/lib/query/clauses/ValuesClause.cjs +1 -0
  208. package/lib/query/clauses/ValuesClause.d.ts +0 -0
  209. package/lib/query/clauses/WhereClause.cjs +1 -0
  210. package/lib/query/clauses/WhereClause.d.ts +0 -0
  211. package/lib/query/clauses/index.cjs +1 -0
  212. package/lib/query/clauses/index.d.ts +0 -0
  213. package/lib/query/constants.cjs +1 -0
  214. package/lib/query/constants.d.ts +0 -0
  215. package/lib/query/errors.cjs +1 -0
  216. package/lib/query/errors.d.ts +0 -0
  217. package/lib/query/index.cjs +1 -0
  218. package/lib/query/index.d.ts +0 -0
  219. package/lib/query/options.cjs +1 -0
  220. package/lib/query/options.d.ts +0 -0
  221. package/lib/query/selectors.cjs +1 -0
  222. package/lib/query/selectors.d.ts +0 -0
  223. package/lib/query/types.cjs +1 -0
  224. package/lib/query/types.d.ts +0 -0
  225. package/lib/repository/Context.cjs +1 -0
  226. package/lib/repository/Context.d.ts +0 -0
  227. package/lib/repository/Repository.cjs +1 -0
  228. package/lib/repository/Repository.d.ts +0 -0
  229. package/lib/repository/constants.cjs +1 -0
  230. package/lib/repository/constants.d.ts +0 -0
  231. package/lib/repository/decorators.cjs +1 -0
  232. package/lib/repository/decorators.d.ts +0 -0
  233. package/lib/repository/errors.cjs +1 -0
  234. package/lib/repository/errors.d.ts +0 -0
  235. package/lib/repository/index.cjs +1 -0
  236. package/lib/repository/index.d.ts +0 -0
  237. package/lib/repository/injectables.cjs +1 -0
  238. package/lib/repository/injectables.d.ts +0 -0
  239. package/lib/repository/types.cjs +1 -0
  240. package/lib/repository/types.d.ts +0 -0
  241. package/lib/repository/utils.cjs +1 -0
  242. package/lib/repository/utils.d.ts +0 -0
  243. package/lib/validators/ClauseSequenceValidator.cjs +8 -7
  244. package/lib/validators/ClauseSequenceValidator.d.ts +3 -3
  245. package/lib/validators/decorators.cjs +1 -0
  246. package/lib/validators/decorators.d.ts +0 -0
  247. package/lib/validators/index.cjs +1 -0
  248. package/lib/validators/index.d.ts +0 -0
  249. package/package.json +36 -38
  250. package/dist/core.bundle.min.js +0 -2
  251. package/dist/core.bundle.min.js.LICENSE.txt +0 -14
  252. package/dist/esm/core.bundle.min.esm.js +0 -2
  253. package/dist/esm/core.bundle.min.esm.js.LICENSE.txt +0 -14
  254. package/dist/lib/identity/decorators.d.ts +0 -24
  255. package/dist/lib/identity/index.d.ts +0 -2
  256. package/dist/lib/identity/utils.d.ts +0 -3
  257. package/dist/lib/index.d.ts +0 -25
  258. package/dist/lib/interfaces/Builder.d.ts +0 -16
  259. package/dist/lib/interfaces/Executor.d.ts +0 -19
  260. package/dist/lib/interfaces/Observable.d.ts +0 -31
  261. package/dist/lib/interfaces/Observer.d.ts +0 -16
  262. package/dist/lib/interfaces/Paginatable.d.ts +0 -4
  263. package/dist/lib/interfaces/Queriable.d.ts +0 -6
  264. package/dist/lib/interfaces/RawExecutor.d.ts +0 -20
  265. package/dist/lib/interfaces/SequenceOptions.d.ts +0 -19
  266. package/dist/lib/interfaces/index.d.ts +0 -7
  267. package/dist/lib/model/BaseModel.d.ts +0 -6
  268. package/dist/lib/model/IdentifiedBaseModel.d.ts +0 -7
  269. package/dist/lib/model/User.d.ts +0 -8
  270. package/dist/lib/model/construction.d.ts +0 -15
  271. package/dist/lib/model/decorators.d.ts +0 -75
  272. package/dist/lib/model/index.d.ts +0 -4
  273. package/dist/lib/model/types.d.ts +0 -6
  274. package/dist/lib/persistence/Adapter.d.ts +0 -86
  275. package/dist/lib/persistence/Sequence.d.ts +0 -22
  276. package/dist/lib/persistence/constants.d.ts +0 -22
  277. package/dist/lib/persistence/decorators.d.ts +0 -1
  278. package/dist/lib/persistence/errors.d.ts +0 -7
  279. package/dist/lib/persistence/index.d.ts +0 -5
  280. package/dist/lib/query/Clause.d.ts +0 -50
  281. package/dist/lib/query/ClauseFactory.d.ts +0 -71
  282. package/dist/lib/query/Condition.d.ts +0 -75
  283. package/dist/lib/query/Paginator.d.ts +0 -22
  284. package/dist/lib/query/Query.d.ts +0 -43
  285. package/dist/lib/query/Statement.d.ts +0 -55
  286. package/dist/lib/query/clauses/FromClause.d.ts +0 -45
  287. package/dist/lib/query/clauses/GroupByClause.d.ts +0 -21
  288. package/dist/lib/query/clauses/InsertClause.d.ts +0 -37
  289. package/dist/lib/query/clauses/LimitClause.d.ts +0 -29
  290. package/dist/lib/query/clauses/OffsetClause.d.ts +0 -21
  291. package/dist/lib/query/clauses/OrderByClause.d.ts +0 -37
  292. package/dist/lib/query/clauses/SelectClause.d.ts +0 -47
  293. package/dist/lib/query/clauses/SelectorBasedClause.d.ts +0 -25
  294. package/dist/lib/query/clauses/ValuesClause.d.ts +0 -21
  295. package/dist/lib/query/clauses/WhereClause.d.ts +0 -46
  296. package/dist/lib/query/clauses/index.d.ts +0 -10
  297. package/dist/lib/query/constants.d.ts +0 -79
  298. package/dist/lib/query/errors.d.ts +0 -7
  299. package/dist/lib/query/index.d.ts +0 -12
  300. package/dist/lib/query/options.d.ts +0 -372
  301. package/dist/lib/query/selectors.d.ts +0 -38
  302. package/dist/lib/query/types.d.ts +0 -2
  303. package/dist/lib/repository/Context.d.ts +0 -10
  304. package/dist/lib/repository/Repository.d.ts +0 -70
  305. package/dist/lib/repository/constants.d.ts +0 -25
  306. package/dist/lib/repository/decorators.d.ts +0 -2
  307. package/dist/lib/repository/errors.d.ts +0 -12
  308. package/dist/lib/repository/index.d.ts +0 -8
  309. package/dist/lib/repository/injectables.d.ts +0 -5
  310. package/dist/lib/repository/types.d.ts +0 -15
  311. package/dist/lib/repository/utils.d.ts +0 -3
  312. package/dist/lib/validators/ClauseSequenceValidator.d.ts +0 -28
  313. package/dist/lib/validators/decorators.d.ts +0 -10
  314. package/dist/lib/validators/index.d.ts +0 -2
package/LICENSE.md CHANGED
File without changes
package/README.md CHANGED
@@ -1,271 +1,67 @@
1
1
  ![Banner](./workdocs/assets/Banner.png)
2
- ## Typescript Template
3
2
 
3
+ ## Core Module
4
4
 
5
+ Introduces the Persistence Adapter concept, a Facade implementation managing all the particularities of each persistence layer.
5
6
 
6
- ![Licence](https://img.shields.io/github/license/decaf-ts/ts-workspace.svg?style=plastic)
7
- ![GitHub language count](https://img.shields.io/github/languages/count/decaf-ts/ts-workspace?style=plastic)
8
- ![GitHub top language](https://img.shields.io/github/languages/top/decaf-ts/ts-workspace?style=plastic)
9
- [![Tests](https://github.com/decaf-ts/ts-workspace/actions/workflows/jest-test.yaml/badge.svg)](http://www.pdmfc.com)
10
- [![CodeQL](https://github.com/starnowski/posmulten/workflows/CodeQL/badge.svg)](https://github.com/decaf-ts/ts-workspace/actions?query=workflow%3ACodeQL)
11
7
 
12
- ![Open Issues](https://img.shields.io/github/issues/decaf-ts/ts-workspace.svg)
13
- ![Closed Issues](https://img.shields.io/github/issues-closed/decaf-ts/ts-workspace.svg)
14
- ![Pull Requests](https://img.shields.io/github/issues-pr-closed/decaf-ts/ts-workspace.svg)
8
+
9
+ ![Licence](https://img.shields.io/github/license/decaf-ts/core.svg?style=plastic)
10
+ ![GitHub language count](https://img.shields.io/github/languages/count/decaf-ts/core?style=plastic)
11
+ ![GitHub top language](https://img.shields.io/github/languages/top/decaf-ts/core?style=plastic)
12
+
13
+ [![Build & Test](https://github.com/decaf-ts/core/actions/workflows/nodejs-build-prod.yaml/badge.svg)](https://github.com/decaf-ts/core/actions/workflows/nodejs-build-prod.yaml)
14
+ [![CodeQL](https://github.com/decaf-ts/core/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/decaf-ts/core/actions/workflows/codeql-analysis.yml)[![Snyk Analysis](https://github.com/decaf-ts/core/actions/workflows/snyk-analysis.yaml/badge.svg)](https://github.com/decaf-ts/core/actions/workflows/snyk-analysis.yaml)
15
+ [![Pages builder](https://github.com/decaf-ts/core/actions/workflows/pages.yaml/badge.svg)](https://github.com/decaf-ts/core/actions/workflows/pages.yaml)
16
+ [![.github/workflows/release-on-tag.yaml](https://github.com/decaf-ts/core/actions/workflows/release-on-tag.yaml/badge.svg?event=release)](https://github.com/decaf-ts/core/actions/workflows/release-on-tag.yaml)
17
+
18
+ ![Open Issues](https://img.shields.io/github/issues/decaf-ts/core.svg)
19
+ ![Closed Issues](https://img.shields.io/github/issues-closed/decaf-ts/core.svg)
20
+ ![Pull Requests](https://img.shields.io/github/issues-pr-closed/decaf-ts/core.svg)
15
21
  ![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green.svg)
16
22
 
17
- ![Line Coverage](workdocs/coverage/badge-lines.svg)
18
- ![Function Coverage](workdocs/coverage/badge-functions.svg)
19
- ![Statement Coverage](workdocs/coverage/badge-statements.svg)
20
- ![Branch Coverage](workdocs/coverage/badge-branches.svg)
23
+ ![Line Coverage](workdocs/reports/coverage/badge-lines.svg)
24
+ ![Function Coverage](workdocs/reports/coverage/badge-functions.svg)
25
+ ![Statement Coverage](workdocs/reports/coverage/badge-statements.svg)
26
+ ![Branch Coverage](workdocs/reports/coverage/badge-branches.svg)
21
27
 
22
28
 
23
- ![Forks](https://img.shields.io/github/forks/decaf-ts/ts-workspace.svg)
24
- ![Stars](https://img.shields.io/github/stars/decaf-ts/ts-workspace.svg)
25
- ![Watchers](https://img.shields.io/github/watchers/decaf-ts/ts-workspace.svg)
29
+ ![Forks](https://img.shields.io/github/forks/decaf-ts/core.svg)
30
+ ![Stars](https://img.shields.io/github/stars/decaf-ts/core.svg)
31
+ ![Watchers](https://img.shields.io/github/watchers/decaf-ts/core.svg)
26
32
 
27
33
  ![Node Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbadges%2Fshields%2Fmaster%2Fpackage.json&label=Node&query=$.engines.node&colorB=blue)
28
34
  ![NPM Version](https://img.shields.io/badge/dynamic/json.svg?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbadges%2Fshields%2Fmaster%2Fpackage.json&label=NPM&query=$.engines.npm&colorB=purple)
29
35
 
30
- Defaults to module, but exports to CommonJS and ESM.
36
+ Documentation available [here](https://decaf-ts.github.io/core/)
31
37
 
32
- With documentation, update and release mechanisms and gitlab/github workflows to match;
38
+ ### Description
33
39
 
34
- Defines a 'way' to write jsDocs to optimize the output
35
40
 
36
- Optimized for github in terms of badges. CI is equivalent between Gitlab and Github.
37
41
 
38
- Auto setup on first `npm install`
42
+ ### How to Use
39
43
 
40
- Will accept a `.token` file containing token valid for private npm dependencies, npm and docker registries
44
+ - [Initial Setup](../../workdocs/tutorials/For%20Developers.md#_initial-setup_)
45
+ - [Installation](../../workdocs/tutorials/For%20Developers.md#installation)
41
46
 
42
- ### ***Initial Setup***
43
47
 
44
- #### if you use github
45
48
 
46
- create a new project using this one as a template.
47
49
 
48
- clone it `git clone <project>` and navigate to the root folder `cd <project>`
49
-
50
- #### If your project has private dependencies or publishes to private npm registries, create an `.npmrc` containing:
50
+ ### Related
51
51
 
52
- ```text
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
- ```
52
+ [![decaf-ts](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decaf-ts)](https://github.com/decaf-ts/decaf-ts)
53
+ [![decorator-validation](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=decorator-validation)](https://github.com/decaf-ts/decorator-validation)
54
+ [![db-decorators](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=db-decorators)](https://github.com/decaf-ts/db-decorators)
59
55
 
60
- Changing:
61
- - <ADDRESS> to `gitlab` or `github` (or other);
62
- - <DOMAIN> to your domain if any (if you are using plain gitlab or github use empty and take care to remove the extra `.`);
63
- - <GROUP_ID> to your project's group id (if any). otherwise remove this line
64
- - <PROJECT_ID> to your project's id
65
56
 
66
- and adding a `.token` file containing your access token to the private registries na repositories.
57
+ ### Social
67
58
 
68
- ### Installation
59
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/decaf-ts/)
69
60
 
70
- Run `npm install` (or `npm run do-install` if you have private dependencies and a `.token` file) to install the dependencies:
71
61
 
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
62
 
187
- [![Readme Card](https://github-readme-stats.vercel.app/api/pin/?username=decaf-ts&repo=ts-workspace)](https://github.com/decaf-ts/ts-workspace)
188
- ### Social
189
63
 
190
- [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/decaf-ts/)
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
- ```
64
+ #### Languages
269
65
 
270
66
  ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
271
67
  ![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)
@@ -284,14 +80,12 @@ I am grateful for any contributions made to this project. Please read [this](./w
284
80
 
285
81
  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
82
 
287
- Financial support is always welcome and helps keep the both me and the project alive and healthy.
83
+ Financial support is always welcome and helps keep both me and the project alive and healthy.
288
84
 
289
85
  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
86
 
291
87
  ## License
292
88
 
293
- This project is released under the [MIT License](LICENSE.md).
294
-
295
- #### Disclaimer:
89
+ This project is released under the [MIT License](./LICENSE.md).
296
90
 
297
- badges found [here](https://dev.to/envoy_/150-badges-for-github-pnk), [here](https://github.com/alexandresanlim/Badges4-README.md-Profile#-social-) and [here](https://github.com/Ileriayo/markdown-badges)
91
+ By developers, for developers...