taon 0.0.0 → 18.0.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 (668) hide show
  1. package/README.md +115 -0
  2. package/assets/shared/shared_folder_info.txt +7 -0
  3. package/bin/start.js +279 -0
  4. package/bin/taon +6 -5
  5. package/bin/taon-debug +5 -5
  6. package/bin/taon-debug-brk +5 -4
  7. package/browser/README.md +24 -0
  8. package/browser/esm2022/lib/base-classes/base-abstract-entity.mjs +18 -0
  9. package/browser/esm2022/lib/base-classes/base-class.mjs +17 -0
  10. package/browser/esm2022/lib/base-classes/base-context.mjs +14 -0
  11. package/browser/esm2022/lib/base-classes/base-controller.mjs +18 -0
  12. package/browser/esm2022/lib/base-classes/base-crud-controller.mjs +279 -0
  13. package/browser/esm2022/lib/base-classes/base-entity.mjs +18 -0
  14. package/browser/esm2022/lib/base-classes/base-injector.mjs +160 -0
  15. package/browser/esm2022/lib/base-classes/base-provider.mjs +6 -0
  16. package/browser/esm2022/lib/base-classes/base-repository.mjs +514 -0
  17. package/browser/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +137 -0
  18. package/browser/esm2022/lib/base-classes/base-subscriber.mjs +27 -0
  19. package/browser/esm2022/lib/base-classes/base.mjs +26 -0
  20. package/browser/esm2022/lib/constants.mjs +4 -0
  21. package/browser/esm2022/lib/create-context.mjs +87 -0
  22. package/browser/esm2022/lib/decorators/classes/controller-decorator.mjs +15 -0
  23. package/browser/esm2022/lib/decorators/classes/entity-decorator.mjs +27 -0
  24. package/browser/esm2022/lib/decorators/classes/provider-decorator.mjs +15 -0
  25. package/browser/esm2022/lib/decorators/classes/repository-decorator.mjs +15 -0
  26. package/browser/esm2022/lib/decorators/classes/subscriber-decorator.mjs +41 -0
  27. package/browser/esm2022/lib/decorators/http/http-decorators.mjs +22 -0
  28. package/browser/esm2022/lib/decorators/http/http-methods-decorators.mjs +78 -0
  29. package/browser/esm2022/lib/decorators/http/http-params-decorators.mjs +47 -0
  30. package/browser/esm2022/lib/dependency-injection/di-container.mjs +32 -0
  31. package/browser/esm2022/lib/endpoint-context.mjs +1746 -0
  32. package/browser/esm2022/lib/entity-process.mjs +207 -0
  33. package/browser/esm2022/lib/env.mjs +6 -0
  34. package/browser/esm2022/lib/get-response-value.mjs +41 -0
  35. package/browser/esm2022/lib/helpers/class-helpers.mjs +183 -0
  36. package/browser/esm2022/lib/helpers/taon-helpers.mjs +120 -0
  37. package/browser/esm2022/lib/index.mjs +79 -0
  38. package/browser/esm2022/lib/inject.mjs +70 -0
  39. package/browser/esm2022/lib/models.mjs +77 -0
  40. package/browser/esm2022/lib/orm.mjs +6 -0
  41. package/browser/esm2022/lib/realtime/realtime-client.mjs +129 -0
  42. package/browser/esm2022/lib/realtime/realtime-core.mjs +54 -0
  43. package/browser/esm2022/lib/realtime/realtime-server.mjs +274 -0
  44. package/browser/esm2022/lib/realtime/realtime-strategy/index.mjs +7 -0
  45. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +98 -0
  46. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +45 -0
  47. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +40 -0
  48. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +25 -0
  49. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +4 -0
  50. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +49 -0
  51. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +5 -0
  52. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +50 -0
  53. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +48 -0
  54. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +35 -0
  55. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +43 -0
  56. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +4 -0
  57. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +28 -0
  58. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +33 -0
  59. package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +10 -0
  60. package/browser/esm2022/lib/realtime/realtime-subs-manager.mjs +79 -0
  61. package/browser/esm2022/lib/realtime/realtime.models.mjs +4 -0
  62. package/browser/esm2022/lib/storage.mjs +5 -0
  63. package/browser/esm2022/lib/symbols.mjs +89 -0
  64. package/browser/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +4 -0
  65. package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +32 -0
  66. package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +167 -0
  67. package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +64 -0
  68. package/browser/esm2022/lib/validators.mjs +76 -0
  69. package/browser/esm2022/public-api.mjs +2 -0
  70. package/browser/esm2022/taon.mjs +5 -0
  71. package/browser/fesm2022/taon.mjs +4901 -0
  72. package/browser/fesm2022/taon.mjs.map +1 -0
  73. package/browser/index.d.ts +6 -0
  74. package/browser/lib/base-classes/base-abstract-entity.d.ts +7 -0
  75. package/browser/lib/base-classes/base-class.d.ts +9 -0
  76. package/browser/lib/base-classes/base-context.d.ts +17 -0
  77. package/browser/lib/base-classes/base-controller.d.ts +8 -0
  78. package/browser/lib/base-classes/base-crud-controller.d.ts +28 -0
  79. package/browser/lib/base-classes/base-entity.d.ts +8 -0
  80. package/browser/lib/base-classes/base-injector.d.ts +60 -0
  81. package/browser/lib/base-classes/base-provider.d.ts +4 -0
  82. package/browser/lib/base-classes/base-repository.d.ts +249 -0
  83. package/browser/lib/base-classes/base-subscriber-for-entity.d.ts +82 -0
  84. package/browser/lib/base-classes/base-subscriber.d.ts +5 -0
  85. package/browser/lib/base-classes/base.d.ts +36 -0
  86. package/browser/lib/constants.d.ts +2 -0
  87. package/browser/lib/create-context.d.ts +25 -0
  88. package/browser/lib/decorators/classes/controller-decorator.d.ts +13 -0
  89. package/browser/lib/decorators/classes/entity-decorator.d.ts +17 -0
  90. package/browser/lib/decorators/classes/provider-decorator.d.ts +5 -0
  91. package/browser/lib/decorators/classes/repository-decorator.d.ts +5 -0
  92. package/browser/lib/decorators/classes/subscriber-decorator.d.ts +6 -0
  93. package/browser/lib/decorators/http/http-decorators.d.ts +18 -0
  94. package/browser/lib/decorators/http/http-methods-decorators.d.ts +15 -0
  95. package/browser/lib/decorators/http/http-params-decorators.d.ts +6 -0
  96. package/browser/lib/dependency-injection/di-container.d.ts +6 -0
  97. package/browser/lib/endpoint-context.d.ts +117 -0
  98. package/browser/lib/entity-process.d.ts +40 -0
  99. package/browser/lib/env.d.ts +3 -0
  100. package/browser/lib/get-response-value.d.ts +7 -0
  101. package/browser/lib/helpers/class-helpers.d.ts +19 -0
  102. package/browser/lib/helpers/taon-helpers.d.ts +17 -0
  103. package/browser/lib/index.d.ts +113 -0
  104. package/browser/lib/inject.d.ts +9 -0
  105. package/browser/lib/models.d.ts +175 -0
  106. package/browser/lib/orm.d.ts +3 -0
  107. package/browser/lib/realtime/realtime-client.d.ts +32 -0
  108. package/browser/lib/realtime/realtime-core.d.ts +41 -0
  109. package/browser/lib/realtime/realtime-server.d.ts +14 -0
  110. package/browser/lib/realtime/realtime-strategy/index.d.ts +5 -0
  111. package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
  112. package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +17 -0
  113. package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +11 -0
  114. package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +11 -0
  115. package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +14 -0
  116. package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +23 -0
  117. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +3 -0
  118. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +17 -0
  119. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +18 -0
  120. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +12 -0
  121. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +14 -0
  122. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +12 -0
  123. package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +15 -0
  124. package/browser/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
  125. package/browser/lib/realtime/realtime-strategy/realtime-strategy.d.ts +13 -0
  126. package/browser/lib/realtime/realtime-subs-manager.d.ts +15 -0
  127. package/browser/lib/realtime/realtime.models.d.ts +14 -0
  128. package/browser/lib/storage.d.ts +2 -0
  129. package/browser/lib/symbols.d.ts +73 -0
  130. package/browser/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +6 -0
  131. package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +18 -0
  132. package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +51 -0
  133. package/browser/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +25 -0
  134. package/browser/lib/validators.d.ts +8 -0
  135. package/browser/package.json +25 -0
  136. package/browser/public-api.d.ts +2 -0
  137. package/cli.d.ts +1 -0
  138. package/cli.js +24 -0
  139. package/cli.js.map +1 -0
  140. package/client/README.md +24 -0
  141. package/client/esm2022/lib/base-classes/base-abstract-entity.mjs +18 -0
  142. package/client/esm2022/lib/base-classes/base-class.mjs +17 -0
  143. package/client/esm2022/lib/base-classes/base-context.mjs +14 -0
  144. package/client/esm2022/lib/base-classes/base-controller.mjs +18 -0
  145. package/client/esm2022/lib/base-classes/base-crud-controller.mjs +279 -0
  146. package/client/esm2022/lib/base-classes/base-entity.mjs +18 -0
  147. package/client/esm2022/lib/base-classes/base-injector.mjs +160 -0
  148. package/client/esm2022/lib/base-classes/base-provider.mjs +6 -0
  149. package/client/esm2022/lib/base-classes/base-repository.mjs +514 -0
  150. package/client/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +137 -0
  151. package/client/esm2022/lib/base-classes/base-subscriber.mjs +27 -0
  152. package/client/esm2022/lib/base-classes/base.mjs +26 -0
  153. package/client/esm2022/lib/constants.mjs +4 -0
  154. package/client/esm2022/lib/create-context.mjs +87 -0
  155. package/client/esm2022/lib/decorators/classes/controller-decorator.mjs +15 -0
  156. package/client/esm2022/lib/decorators/classes/entity-decorator.mjs +27 -0
  157. package/client/esm2022/lib/decorators/classes/provider-decorator.mjs +15 -0
  158. package/client/esm2022/lib/decorators/classes/repository-decorator.mjs +15 -0
  159. package/client/esm2022/lib/decorators/classes/subscriber-decorator.mjs +41 -0
  160. package/client/esm2022/lib/decorators/http/http-decorators.mjs +22 -0
  161. package/client/esm2022/lib/decorators/http/http-methods-decorators.mjs +78 -0
  162. package/client/esm2022/lib/decorators/http/http-params-decorators.mjs +47 -0
  163. package/client/esm2022/lib/dependency-injection/di-container.mjs +32 -0
  164. package/client/esm2022/lib/endpoint-context.mjs +1746 -0
  165. package/client/esm2022/lib/entity-process.mjs +207 -0
  166. package/client/esm2022/lib/env.mjs +6 -0
  167. package/client/esm2022/lib/get-response-value.mjs +41 -0
  168. package/client/esm2022/lib/helpers/class-helpers.mjs +183 -0
  169. package/client/esm2022/lib/helpers/taon-helpers.mjs +120 -0
  170. package/client/esm2022/lib/index.mjs +79 -0
  171. package/client/esm2022/lib/inject.mjs +70 -0
  172. package/client/esm2022/lib/models.mjs +77 -0
  173. package/client/esm2022/lib/orm.mjs +6 -0
  174. package/client/esm2022/lib/realtime/realtime-client.mjs +129 -0
  175. package/client/esm2022/lib/realtime/realtime-core.mjs +54 -0
  176. package/client/esm2022/lib/realtime/realtime-server.mjs +274 -0
  177. package/client/esm2022/lib/realtime/realtime-strategy/index.mjs +7 -0
  178. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +98 -0
  179. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +45 -0
  180. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +40 -0
  181. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +25 -0
  182. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +4 -0
  183. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +49 -0
  184. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +5 -0
  185. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +50 -0
  186. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +48 -0
  187. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +35 -0
  188. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +43 -0
  189. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +4 -0
  190. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +28 -0
  191. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +33 -0
  192. package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +10 -0
  193. package/client/esm2022/lib/realtime/realtime-subs-manager.mjs +79 -0
  194. package/client/esm2022/lib/realtime/realtime.models.mjs +4 -0
  195. package/client/esm2022/lib/storage.mjs +5 -0
  196. package/client/esm2022/lib/symbols.mjs +89 -0
  197. package/client/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +4 -0
  198. package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +32 -0
  199. package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +167 -0
  200. package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +64 -0
  201. package/client/esm2022/lib/validators.mjs +76 -0
  202. package/client/esm2022/public-api.mjs +2 -0
  203. package/client/esm2022/taon.mjs +5 -0
  204. package/client/fesm2022/taon.mjs +4901 -0
  205. package/client/fesm2022/taon.mjs.map +1 -0
  206. package/client/index.d.ts +6 -0
  207. package/client/lib/base-classes/base-abstract-entity.d.ts +7 -0
  208. package/client/lib/base-classes/base-class.d.ts +9 -0
  209. package/client/lib/base-classes/base-context.d.ts +17 -0
  210. package/client/lib/base-classes/base-controller.d.ts +8 -0
  211. package/client/lib/base-classes/base-crud-controller.d.ts +28 -0
  212. package/client/lib/base-classes/base-entity.d.ts +8 -0
  213. package/client/lib/base-classes/base-injector.d.ts +60 -0
  214. package/client/lib/base-classes/base-provider.d.ts +4 -0
  215. package/client/lib/base-classes/base-repository.d.ts +249 -0
  216. package/client/lib/base-classes/base-subscriber-for-entity.d.ts +82 -0
  217. package/client/lib/base-classes/base-subscriber.d.ts +5 -0
  218. package/client/lib/base-classes/base.d.ts +36 -0
  219. package/client/lib/constants.d.ts +2 -0
  220. package/client/lib/create-context.d.ts +25 -0
  221. package/client/lib/decorators/classes/controller-decorator.d.ts +13 -0
  222. package/client/lib/decorators/classes/entity-decorator.d.ts +17 -0
  223. package/client/lib/decorators/classes/provider-decorator.d.ts +5 -0
  224. package/client/lib/decorators/classes/repository-decorator.d.ts +5 -0
  225. package/client/lib/decorators/classes/subscriber-decorator.d.ts +6 -0
  226. package/client/lib/decorators/http/http-decorators.d.ts +18 -0
  227. package/client/lib/decorators/http/http-methods-decorators.d.ts +15 -0
  228. package/client/lib/decorators/http/http-params-decorators.d.ts +6 -0
  229. package/client/lib/dependency-injection/di-container.d.ts +6 -0
  230. package/client/lib/endpoint-context.d.ts +117 -0
  231. package/client/lib/entity-process.d.ts +40 -0
  232. package/client/lib/env.d.ts +3 -0
  233. package/client/lib/get-response-value.d.ts +7 -0
  234. package/client/lib/helpers/class-helpers.d.ts +19 -0
  235. package/client/lib/helpers/taon-helpers.d.ts +17 -0
  236. package/client/lib/index.d.ts +113 -0
  237. package/client/lib/inject.d.ts +9 -0
  238. package/client/lib/models.d.ts +175 -0
  239. package/client/lib/orm.d.ts +3 -0
  240. package/client/lib/realtime/realtime-client.d.ts +32 -0
  241. package/client/lib/realtime/realtime-core.d.ts +41 -0
  242. package/client/lib/realtime/realtime-server.d.ts +14 -0
  243. package/client/lib/realtime/realtime-strategy/index.d.ts +5 -0
  244. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
  245. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +17 -0
  246. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +11 -0
  247. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +11 -0
  248. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +14 -0
  249. package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +23 -0
  250. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +3 -0
  251. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +17 -0
  252. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +18 -0
  253. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +12 -0
  254. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +14 -0
  255. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +12 -0
  256. package/client/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +15 -0
  257. package/client/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
  258. package/client/lib/realtime/realtime-strategy/realtime-strategy.d.ts +13 -0
  259. package/client/lib/realtime/realtime-subs-manager.d.ts +15 -0
  260. package/client/lib/realtime/realtime.models.d.ts +14 -0
  261. package/client/lib/storage.d.ts +2 -0
  262. package/client/lib/symbols.d.ts +73 -0
  263. package/client/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +6 -0
  264. package/client/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +18 -0
  265. package/client/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +51 -0
  266. package/client/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +25 -0
  267. package/client/lib/validators.d.ts +8 -0
  268. package/client/public-api.d.ts +2 -0
  269. package/index.d.ts +1 -0
  270. package/index.js +5 -1
  271. package/index.js.map +1 -0
  272. package/lib/base-classes/base-abstract-entity.d.ts +6 -0
  273. package/lib/base-classes/base-abstract-entity.js +40 -0
  274. package/lib/base-classes/base-abstract-entity.js.map +1 -0
  275. package/lib/base-classes/base-class.d.ts +8 -0
  276. package/lib/base-classes/base-class.js +35 -0
  277. package/lib/base-classes/base-class.js.map +1 -0
  278. package/lib/base-classes/base-context.d.ts +16 -0
  279. package/lib/base-classes/base-context.js +15 -0
  280. package/lib/base-classes/base-context.js.map +1 -0
  281. package/lib/base-classes/base-controller.d.ts +7 -0
  282. package/lib/base-classes/base-controller.js +24 -0
  283. package/lib/base-classes/base-controller.js.map +1 -0
  284. package/lib/base-classes/base-crud-controller.d.ts +27 -0
  285. package/lib/base-classes/base-crud-controller.js +385 -0
  286. package/lib/base-classes/base-crud-controller.js.map +1 -0
  287. package/lib/base-classes/base-entity.d.ts +7 -0
  288. package/lib/base-classes/base-entity.js +25 -0
  289. package/lib/base-classes/base-entity.js.map +1 -0
  290. package/lib/base-classes/base-injector.d.ts +59 -0
  291. package/lib/base-classes/base-injector.js +220 -0
  292. package/lib/base-classes/base-injector.js.map +1 -0
  293. package/lib/base-classes/base-provider.d.ts +3 -0
  294. package/lib/base-classes/base-provider.js +14 -0
  295. package/lib/base-classes/base-provider.js.map +1 -0
  296. package/lib/base-classes/base-repository.d.ts +254 -0
  297. package/lib/base-classes/base-repository.js +780 -0
  298. package/lib/base-classes/base-repository.js.map +1 -0
  299. package/lib/base-classes/base-subscriber-for-entity.d.ts +81 -0
  300. package/lib/base-classes/base-subscriber-for-entity.js +136 -0
  301. package/lib/base-classes/base-subscriber-for-entity.js.map +1 -0
  302. package/lib/base-classes/base-subscriber.d.ts +4 -0
  303. package/lib/base-classes/base-subscriber.js +25 -0
  304. package/lib/base-classes/base-subscriber.js.map +1 -0
  305. package/lib/base-classes/base.d.ts +35 -0
  306. package/lib/base-classes/base.js +27 -0
  307. package/lib/base-classes/base.js.map +1 -0
  308. package/lib/build-info._auto-generated_.d.ts +1 -0
  309. package/lib/build-info._auto-generated_.js +5 -0
  310. package/lib/build-info._auto-generated_.js.map +1 -0
  311. package/lib/constants.d.ts +1 -0
  312. package/lib/constants.js +3 -0
  313. package/lib/constants.js.map +1 -0
  314. package/lib/create-context.d.ts +24 -0
  315. package/lib/create-context.js +183 -0
  316. package/lib/create-context.js.map +1 -0
  317. package/lib/decorators/classes/controller-decorator.d.ts +12 -0
  318. package/lib/decorators/classes/controller-decorator.js +24 -0
  319. package/lib/decorators/classes/controller-decorator.js.map +1 -0
  320. package/lib/decorators/classes/entity-decorator.d.ts +16 -0
  321. package/lib/decorators/classes/entity-decorator.js +39 -0
  322. package/lib/decorators/classes/entity-decorator.js.map +1 -0
  323. package/lib/decorators/classes/provider-decorator.d.ts +4 -0
  324. package/lib/decorators/classes/provider-decorator.js +24 -0
  325. package/lib/decorators/classes/provider-decorator.js.map +1 -0
  326. package/lib/decorators/classes/repository-decorator.d.ts +4 -0
  327. package/lib/decorators/classes/repository-decorator.js +24 -0
  328. package/lib/decorators/classes/repository-decorator.js.map +1 -0
  329. package/lib/decorators/classes/subscriber-decorator.d.ts +5 -0
  330. package/lib/decorators/classes/subscriber-decorator.js +75 -0
  331. package/lib/decorators/classes/subscriber-decorator.js.map +1 -0
  332. package/lib/decorators/http/http-decorators.d.ts +17 -0
  333. package/lib/decorators/http/http-decorators.js +23 -0
  334. package/lib/decorators/http/http-decorators.js.map +1 -0
  335. package/lib/decorators/http/http-methods-decorators.d.ts +14 -0
  336. package/lib/decorators/http/http-methods-decorators.js +91 -0
  337. package/lib/decorators/http/http-methods-decorators.js.map +1 -0
  338. package/lib/decorators/http/http-params-decorators.d.ts +5 -0
  339. package/lib/decorators/http/http-params-decorators.js +55 -0
  340. package/lib/decorators/http/http-params-decorators.js.map +1 -0
  341. package/lib/dependency-injection/di-container.d.ts +5 -0
  342. package/lib/dependency-injection/di-container.js +40 -0
  343. package/lib/dependency-injection/di-container.js.map +1 -0
  344. package/lib/endpoint-context.d.ts +117 -0
  345. package/lib/endpoint-context.js +2128 -0
  346. package/lib/endpoint-context.js.map +1 -0
  347. package/lib/entity-process.d.ts +39 -0
  348. package/lib/entity-process.js +261 -0
  349. package/lib/entity-process.js.map +1 -0
  350. package/lib/env.d.ts +2 -0
  351. package/lib/env.js +7 -0
  352. package/lib/env.js.map +1 -0
  353. package/lib/formly/formly-group-wrapper-component.d.ts +5 -0
  354. package/lib/formly/formly-group-wrapper-component.js +28 -0
  355. package/lib/formly/formly-group-wrapper-component.js.map +1 -0
  356. package/lib/formly/formly-repeat-component.d.ts +5 -0
  357. package/lib/formly/formly-repeat-component.js +47 -0
  358. package/lib/formly/formly-repeat-component.js.map +1 -0
  359. package/lib/formly/formly.models.d.ts +1 -0
  360. package/lib/formly/formly.models.js +3 -0
  361. package/lib/formly/formly.models.js.map +1 -0
  362. package/lib/formly/fromly.d.ts +16 -0
  363. package/lib/formly/fromly.js +213 -0
  364. package/lib/formly/fromly.js.map +1 -0
  365. package/lib/formly/type-from-entity.d.ts +20 -0
  366. package/lib/formly/type-from-entity.js +65 -0
  367. package/lib/formly/type-from-entity.js.map +1 -0
  368. package/lib/get-response-value.d.ts +6 -0
  369. package/lib/get-response-value.js +65 -0
  370. package/lib/get-response-value.js.map +1 -0
  371. package/lib/helpers/class-helpers.d.ts +18 -0
  372. package/lib/helpers/class-helpers.js +227 -0
  373. package/lib/helpers/class-helpers.js.map +1 -0
  374. package/lib/helpers/taon-helpers.d.ts +16 -0
  375. package/lib/helpers/taon-helpers.js +144 -0
  376. package/lib/helpers/taon-helpers.js.map +1 -0
  377. package/lib/index.d.ts +112 -0
  378. package/lib/index.js +113 -0
  379. package/lib/index.js.map +1 -0
  380. package/lib/inject.d.ts +8 -0
  381. package/lib/inject.js +84 -0
  382. package/lib/inject.js.map +1 -0
  383. package/lib/models.d.ts +180 -0
  384. package/lib/models.js +107 -0
  385. package/lib/models.js.map +1 -0
  386. package/lib/orm.d.ts +51 -0
  387. package/lib/orm.js +79 -0
  388. package/lib/orm.js.map +1 -0
  389. package/lib/realtime/realtime-client.d.ts +31 -0
  390. package/lib/realtime/realtime-client.js +158 -0
  391. package/lib/realtime/realtime-client.js.map +1 -0
  392. package/lib/realtime/realtime-core.d.ts +40 -0
  393. package/lib/realtime/realtime-core.js +72 -0
  394. package/lib/realtime/realtime-core.js.map +1 -0
  395. package/lib/realtime/realtime-server.d.ts +13 -0
  396. package/lib/realtime/realtime-server.js +193 -0
  397. package/lib/realtime/realtime-server.js.map +1 -0
  398. package/lib/realtime/realtime-strategy/index.d.ts +4 -0
  399. package/lib/realtime/realtime-strategy/index.js +8 -0
  400. package/lib/realtime/realtime-strategy/index.js.map +1 -0
  401. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
  402. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +5 -0
  403. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js.map +1 -0
  404. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
  405. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +139 -0
  406. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +1 -0
  407. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +16 -0
  408. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +68 -0
  409. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +1 -0
  410. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +10 -0
  411. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +56 -0
  412. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +1 -0
  413. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +10 -0
  414. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +50 -0
  415. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +1 -0
  416. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +13 -0
  417. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +3 -0
  418. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +1 -0
  419. package/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +22 -0
  420. package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js +68 -0
  421. package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -0
  422. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +2 -0
  423. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +6 -0
  424. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +1 -0
  425. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +16 -0
  426. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +54 -0
  427. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +1 -0
  428. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +17 -0
  429. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +52 -0
  430. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +1 -0
  431. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +11 -0
  432. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +39 -0
  433. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +1 -0
  434. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +13 -0
  435. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +46 -0
  436. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +1 -0
  437. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +11 -0
  438. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +3 -0
  439. package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +1 -0
  440. package/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +14 -0
  441. package/lib/realtime/realtime-strategy/realtime-strategy-mock.js +42 -0
  442. package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -0
  443. package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
  444. package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js +48 -0
  445. package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -0
  446. package/lib/realtime/realtime-strategy/realtime-strategy.d.ts +12 -0
  447. package/lib/realtime/realtime-strategy/realtime-strategy.js +14 -0
  448. package/lib/realtime/realtime-strategy/realtime-strategy.js.map +1 -0
  449. package/lib/realtime/realtime-subs-manager.d.ts +14 -0
  450. package/lib/realtime/realtime-subs-manager.js +102 -0
  451. package/lib/realtime/realtime-subs-manager.js.map +1 -0
  452. package/lib/realtime/realtime.models.d.ts +13 -0
  453. package/lib/realtime/realtime.models.js +3 -0
  454. package/lib/realtime/realtime.models.js.map +1 -0
  455. package/lib/storage.d.ts +1 -0
  456. package/lib/storage.js +6 -0
  457. package/lib/storage.js.map +1 -0
  458. package/lib/symbols.d.ts +72 -0
  459. package/lib/symbols.js +91 -0
  460. package/lib/symbols.js.map +1 -0
  461. package/lib/ui/directives/firedev-inject-html.directive.d.ts +6 -0
  462. package/lib/ui/directives/firedev-long-press.directive.d.ts +22 -0
  463. package/lib/ui/directives/index.d.ts +4 -0
  464. package/lib/ui/directives/index.js +5 -0
  465. package/lib/ui/directives/index.js.map +1 -0
  466. package/lib/ui/directives/safe.pipe.d.ts +7 -0
  467. package/lib/ui/directives/view-mode.d.ts +5 -0
  468. package/lib/ui/directives/view-mode.js +10 -0
  469. package/lib/ui/directives/view-mode.js.map +1 -0
  470. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +2 -0
  471. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +5 -0
  472. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +1 -0
  473. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +31 -0
  474. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +2 -0
  475. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +1 -0
  476. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +5 -0
  477. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +1 -0
  478. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +9 -0
  479. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +2 -0
  480. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +5 -0
  481. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +1 -0
  482. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +14 -0
  483. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +2 -0
  484. package/lib/ui/taon-admin-mode-configuration/index.d.ts +4 -0
  485. package/lib/ui/taon-admin-mode-configuration/index.js +5 -0
  486. package/lib/ui/taon-admin-mode-configuration/index.js.map +1 -0
  487. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +5 -0
  488. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +3 -0
  489. package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +1 -0
  490. package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +14 -0
  491. package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +47 -0
  492. package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +2 -0
  493. package/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +21 -0
  494. package/lib/ui/taon-github-fork-me-corner/index.d.ts +2 -0
  495. package/lib/ui/taon-github-fork-me-corner/index.js +5 -0
  496. package/lib/ui/taon-github-fork-me-corner/index.js.map +1 -0
  497. package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +3 -0
  498. package/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +2 -0
  499. package/lib/ui/taon-github-fork-me-ribbon/index.d.ts +2 -0
  500. package/lib/ui/taon-github-fork-me-ribbon/index.js +5 -0
  501. package/lib/ui/taon-github-fork-me-ribbon/index.js.map +1 -0
  502. package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.component.d.ts +3 -0
  503. package/lib/ui/taon-github-fork-me-ribbon/taon-github-fork-me-ribbon.module.d.ts +2 -0
  504. package/lib/ui/taon-notifications/index.d.ts +4 -0
  505. package/lib/ui/taon-notifications/index.js +11 -0
  506. package/lib/ui/taon-notifications/index.js.map +1 -0
  507. package/lib/ui/taon-notifications/taon-notifications.component.d.ts +9 -0
  508. package/lib/ui/taon-notifications/taon-notifications.models.d.ts +6 -0
  509. package/lib/ui/taon-notifications/taon-notifications.models.js +5 -0
  510. package/lib/ui/taon-notifications/taon-notifications.models.js.map +1 -0
  511. package/lib/ui/taon-notifications/taon-notifications.module.d.ts +2 -0
  512. package/lib/ui/taon-notifications/taon-notifications.service.d.ts +11 -0
  513. package/lib/ui/taon-progress-bar/index.d.ts +2 -0
  514. package/lib/ui/taon-progress-bar/index.js +5 -0
  515. package/lib/ui/taon-progress-bar/index.js.map +1 -0
  516. package/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +14 -0
  517. package/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +2 -0
  518. package/lib/ui/taon-session-passcode/index.d.ts +1 -0
  519. package/lib/ui/taon-session-passcode/index.js +5 -0
  520. package/lib/ui/taon-session-passcode/index.js.map +1 -0
  521. package/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +35 -0
  522. package/lib/ui/taon.models.d.ts +11 -0
  523. package/lib/ui/taon.models.js +3 -0
  524. package/lib/ui/taon.models.js.map +1 -0
  525. package/lib/ui/toan-full-material.module.d.ts +2 -0
  526. package/lib/validators.d.ts +7 -0
  527. package/lib/validators.js +53 -0
  528. package/lib/validators.js.map +1 -0
  529. package/old-app .d.ts +0 -0
  530. package/old-app .js +115 -0
  531. package/old-app .js.map +1 -0
  532. package/package.json +74 -11
  533. package/playground.d.ts +0 -0
  534. package/playground.js +172 -0
  535. package/playground.js.map +1 -0
  536. package/src.d.ts +6 -0
  537. package/taon.jsonc +48 -0
  538. package/tmp-environment.json +392 -0
  539. package/websql/README.md +24 -0
  540. package/websql/esm2022/lib/base-classes/base-abstract-entity.mjs +25 -0
  541. package/websql/esm2022/lib/base-classes/base-class.mjs +17 -0
  542. package/websql/esm2022/lib/base-classes/base-context.mjs +14 -0
  543. package/websql/esm2022/lib/base-classes/base-controller.mjs +18 -0
  544. package/websql/esm2022/lib/base-classes/base-crud-controller.mjs +238 -0
  545. package/websql/esm2022/lib/base-classes/base-entity.mjs +16 -0
  546. package/websql/esm2022/lib/base-classes/base-injector.mjs +160 -0
  547. package/websql/esm2022/lib/base-classes/base-provider.mjs +6 -0
  548. package/websql/esm2022/lib/base-classes/base-repository.mjs +431 -0
  549. package/websql/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +137 -0
  550. package/websql/esm2022/lib/base-classes/base-subscriber.mjs +27 -0
  551. package/websql/esm2022/lib/base-classes/base.mjs +26 -0
  552. package/websql/esm2022/lib/constants.mjs +4 -0
  553. package/websql/esm2022/lib/create-context.mjs +86 -0
  554. package/websql/esm2022/lib/decorators/classes/controller-decorator.mjs +15 -0
  555. package/websql/esm2022/lib/decorators/classes/entity-decorator.mjs +25 -0
  556. package/websql/esm2022/lib/decorators/classes/provider-decorator.mjs +15 -0
  557. package/websql/esm2022/lib/decorators/classes/repository-decorator.mjs +15 -0
  558. package/websql/esm2022/lib/decorators/classes/subscriber-decorator.mjs +41 -0
  559. package/websql/esm2022/lib/decorators/http/http-decorators.mjs +22 -0
  560. package/websql/esm2022/lib/decorators/http/http-methods-decorators.mjs +78 -0
  561. package/websql/esm2022/lib/decorators/http/http-params-decorators.mjs +47 -0
  562. package/websql/esm2022/lib/dependency-injection/di-container.mjs +32 -0
  563. package/websql/esm2022/lib/endpoint-context.mjs +1506 -0
  564. package/websql/esm2022/lib/entity-process.mjs +207 -0
  565. package/websql/esm2022/lib/env.mjs +6 -0
  566. package/websql/esm2022/lib/get-response-value.mjs +45 -0
  567. package/websql/esm2022/lib/helpers/class-helpers.mjs +183 -0
  568. package/websql/esm2022/lib/helpers/taon-helpers.mjs +120 -0
  569. package/websql/esm2022/lib/index.mjs +81 -0
  570. package/websql/esm2022/lib/inject.mjs +70 -0
  571. package/websql/esm2022/lib/models.mjs +70 -0
  572. package/websql/esm2022/lib/orm.mjs +60 -0
  573. package/websql/esm2022/lib/realtime/realtime-client.mjs +129 -0
  574. package/websql/esm2022/lib/realtime/realtime-core.mjs +54 -0
  575. package/websql/esm2022/lib/realtime/realtime-server.mjs +158 -0
  576. package/websql/esm2022/lib/realtime/realtime-strategy/index.mjs +7 -0
  577. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +98 -0
  578. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +45 -0
  579. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +40 -0
  580. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +25 -0
  581. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +4 -0
  582. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +48 -0
  583. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +5 -0
  584. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +50 -0
  585. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +48 -0
  586. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +35 -0
  587. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +43 -0
  588. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +4 -0
  589. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +28 -0
  590. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +33 -0
  591. package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +10 -0
  592. package/websql/esm2022/lib/realtime/realtime-subs-manager.mjs +79 -0
  593. package/websql/esm2022/lib/realtime/realtime.models.mjs +4 -0
  594. package/websql/esm2022/lib/storage.mjs +5 -0
  595. package/websql/esm2022/lib/symbols.mjs +89 -0
  596. package/websql/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +4 -0
  597. package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +32 -0
  598. package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +167 -0
  599. package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +64 -0
  600. package/websql/esm2022/lib/validators.mjs +76 -0
  601. package/websql/esm2022/public-api.mjs +2 -0
  602. package/websql/esm2022/taon.mjs +5 -0
  603. package/websql/fesm2022/taon.mjs +4595 -0
  604. package/websql/fesm2022/taon.mjs.map +1 -0
  605. package/websql/index.d.ts +6 -0
  606. package/websql/lib/base-classes/base-abstract-entity.d.ts +7 -0
  607. package/websql/lib/base-classes/base-class.d.ts +9 -0
  608. package/websql/lib/base-classes/base-context.d.ts +17 -0
  609. package/websql/lib/base-classes/base-controller.d.ts +8 -0
  610. package/websql/lib/base-classes/base-crud-controller.d.ts +28 -0
  611. package/websql/lib/base-classes/base-entity.d.ts +8 -0
  612. package/websql/lib/base-classes/base-injector.d.ts +60 -0
  613. package/websql/lib/base-classes/base-provider.d.ts +4 -0
  614. package/websql/lib/base-classes/base-repository.d.ts +255 -0
  615. package/websql/lib/base-classes/base-subscriber-for-entity.d.ts +82 -0
  616. package/websql/lib/base-classes/base-subscriber.d.ts +5 -0
  617. package/websql/lib/base-classes/base.d.ts +36 -0
  618. package/websql/lib/constants.d.ts +2 -0
  619. package/websql/lib/create-context.d.ts +25 -0
  620. package/websql/lib/decorators/classes/controller-decorator.d.ts +13 -0
  621. package/websql/lib/decorators/classes/entity-decorator.d.ts +17 -0
  622. package/websql/lib/decorators/classes/provider-decorator.d.ts +5 -0
  623. package/websql/lib/decorators/classes/repository-decorator.d.ts +5 -0
  624. package/websql/lib/decorators/classes/subscriber-decorator.d.ts +6 -0
  625. package/websql/lib/decorators/http/http-decorators.d.ts +18 -0
  626. package/websql/lib/decorators/http/http-methods-decorators.d.ts +15 -0
  627. package/websql/lib/decorators/http/http-params-decorators.d.ts +6 -0
  628. package/websql/lib/dependency-injection/di-container.d.ts +6 -0
  629. package/websql/lib/endpoint-context.d.ts +117 -0
  630. package/websql/lib/entity-process.d.ts +40 -0
  631. package/websql/lib/env.d.ts +3 -0
  632. package/websql/lib/get-response-value.d.ts +7 -0
  633. package/websql/lib/helpers/class-helpers.d.ts +19 -0
  634. package/websql/lib/helpers/taon-helpers.d.ts +17 -0
  635. package/websql/lib/index.d.ts +113 -0
  636. package/websql/lib/inject.d.ts +9 -0
  637. package/websql/lib/models.d.ts +181 -0
  638. package/websql/lib/orm.d.ts +52 -0
  639. package/websql/lib/realtime/realtime-client.d.ts +32 -0
  640. package/websql/lib/realtime/realtime-core.d.ts +41 -0
  641. package/websql/lib/realtime/realtime-server.d.ts +14 -0
  642. package/websql/lib/realtime/realtime-strategy/index.d.ts +5 -0
  643. package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
  644. package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +17 -0
  645. package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +11 -0
  646. package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +11 -0
  647. package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +14 -0
  648. package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +23 -0
  649. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +3 -0
  650. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +17 -0
  651. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +18 -0
  652. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +12 -0
  653. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +14 -0
  654. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +12 -0
  655. package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +15 -0
  656. package/websql/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +17 -0
  657. package/websql/lib/realtime/realtime-strategy/realtime-strategy.d.ts +13 -0
  658. package/websql/lib/realtime/realtime-subs-manager.d.ts +15 -0
  659. package/websql/lib/realtime/realtime.models.d.ts +14 -0
  660. package/websql/lib/storage.d.ts +2 -0
  661. package/websql/lib/symbols.d.ts +73 -0
  662. package/websql/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +6 -0
  663. package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +18 -0
  664. package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +51 -0
  665. package/websql/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +25 -0
  666. package/websql/lib/validators.d.ts +8 -0
  667. package/websql/package.json +25 -0
  668. package/websql/public-api.d.ts +2 -0
@@ -0,0 +1,780 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseRepository = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var tnp_core_1 = require("tnp-core");
6
+ var tnp_core_2 = require("tnp-core");
7
+ var class_helpers_1 = require("../helpers/class-helpers");
8
+ var taon_type_sql_1 = require("taon-type-sql");
9
+ var repository_decorator_1 = require("../decorators/classes/repository-decorator");
10
+ var base_injector_1 = require("./base-injector");
11
+ //#endregion
12
+ var INDEX_KEYS_NO_FOR_UPDATE = ['id'];
13
+ var BaseRepository = /** @class */ (function (_super) {
14
+ tslib_1.__extends(BaseRepository, _super);
15
+ function BaseRepository(
16
+ // Injected through BaseCrudController
17
+ __entityClassResolveFn) {
18
+ var _this = _super.call(this) || this;
19
+ _this.__entityClassResolveFn = __entityClassResolveFn;
20
+ // @ts-ignore
21
+ _this.entityClassResolveFn = __entityClassResolveFn;
22
+ return _this;
23
+ }
24
+ Object.defineProperty(BaseRepository.prototype, "dbQuery", {
25
+ get: function () {
26
+ var _a, _b;
27
+ //#region @websqlFunc
28
+ if (!this.__dbQuery) {
29
+ if (!this.__endpoint_context__) {
30
+ return; // TODO
31
+ throw new Error("[BaseRepository] Context not inited for class ".concat(class_helpers_1.ClassHelpers.getName(this)));
32
+ }
33
+ var connection = (_a = this.__endpoint_context__) === null || _a === void 0 ? void 0 : _a.connection;
34
+ if (!connection) {
35
+ throw new Error("[BaseRepository] Database not inited for context ".concat((_b = this.__endpoint_context__) === null || _b === void 0 ? void 0 : _b.contextName));
36
+ }
37
+ this.__dbQuery = new taon_type_sql_1.MySqlQuerySource(connection);
38
+ }
39
+ return this.__dbQuery;
40
+ //#endregion
41
+ },
42
+ enumerable: false,
43
+ configurable: true
44
+ });
45
+ Object.defineProperty(BaseRepository.prototype, "connection", {
46
+ //#endregion
47
+ //#region connection
48
+ get: function () {
49
+ var _a;
50
+ //#region @websqlFunc
51
+ return (_a = this.__endpoint_context__) === null || _a === void 0 ? void 0 : _a.connection;
52
+ //#endregion
53
+ },
54
+ enumerable: false,
55
+ configurable: true
56
+ });
57
+ Object.defineProperty(BaseRepository.prototype, "repository", {
58
+ //#endregion
59
+ get: function () {
60
+ //#region @websqlFunc
61
+ return this.__repository;
62
+ //#endregion
63
+ },
64
+ enumerable: false,
65
+ configurable: true
66
+ });
67
+ Object.defineProperty(BaseRepository.prototype, "target", {
68
+ /**
69
+ * target for repository
70
+ */
71
+ get: function () {
72
+ var _a;
73
+ //#region @websqlFunc
74
+ return (_a = this === null || this === void 0 ? void 0 : this.repository) === null || _a === void 0 ? void 0 : _a.target;
75
+ //#endregion
76
+ },
77
+ enumerable: false,
78
+ configurable: true
79
+ });
80
+ Object.defineProperty(BaseRepository.prototype, "repo", {
81
+ /**
82
+ * alias to repository
83
+ */
84
+ get: function () {
85
+ //#region @websqlFunc
86
+ return this.repository;
87
+ //#endregion
88
+ },
89
+ enumerable: false,
90
+ configurable: true
91
+ });
92
+ Object.defineProperty(BaseRepository.prototype, "repositoryExists", {
93
+ get: function () {
94
+ //#region @websqlFunc
95
+ return !!this.__repository;
96
+ //#endregion
97
+ },
98
+ enumerable: false,
99
+ configurable: true
100
+ });
101
+ //#endregion
102
+ //#region init
103
+ BaseRepository.prototype.__init = function (context) {
104
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
105
+ var entityClassFn, ctx, connection, _a;
106
+ return tslib_1.__generator(this, function (_b) {
107
+ switch (_b.label) {
108
+ case 0:
109
+ //#region @websql
110
+ if (this.__repository) {
111
+ return [2 /*return*/];
112
+ }
113
+ entityClassFn = this.entityClassResolveFn();
114
+ if (!entityClassFn) {
115
+ tnp_core_1.Helpers.warn("Entity class not provided for repository ".concat(class_helpers_1.ClassHelpers.getName(this)));
116
+ return [2 /*return*/];
117
+ }
118
+ ctx = this.__endpoint_context__;
119
+ if (ctx.remoteHost) {
120
+ return [2 /*return*/];
121
+ }
122
+ connection = ctx.connection;
123
+ if (!connection) {
124
+ throw new Error("\n\n Connection not found for context ".concat(ctx.contextName, "\n\n\n Maybe you forgot to init database ?\n\n Taon.createContext({\n ...\n database:true\n ...\n })\n\n "));
125
+ }
126
+ if (!entityClassFn) {
127
+ tnp_core_1.Helpers.warn("Entity class not found for repository ".concat(class_helpers_1.ClassHelpers.getName(this)));
128
+ return [2 /*return*/];
129
+ }
130
+ _a = this;
131
+ return [4 /*yield*/, connection.getRepository(class_helpers_1.ClassHelpers.getOrginalClass(entityClassFn))];
132
+ case 1:
133
+ _a.__repository = (_b.sent());
134
+ return [2 /*return*/];
135
+ }
136
+ });
137
+ });
138
+ };
139
+ //#endregion
140
+ //#region crud operations / typeorm / has id
141
+ /**
142
+ * Checks if entity has an id.
143
+ * If entity composite compose ids, it will check them all.
144
+ */
145
+ BaseRepository.prototype.hasId = function (entity) {
146
+ return this.repo.hasId(entity);
147
+ };
148
+ //#endregion
149
+ //#region crud operations / typeorm / get id
150
+ /**
151
+ * Gets entity mixed id.
152
+ */
153
+ BaseRepository.prototype.getId = function (entity) {
154
+ return this.repo.getId(entity);
155
+ };
156
+ //#endregion
157
+ //#region crud operations / typeorm / create & bulk create
158
+ /**
159
+ Saves a given entity in the database.
160
+ * If entity does not exist in the database then inserts, otherwise updates.
161
+ */
162
+ BaseRepository.prototype.save = function (item, options) {
163
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
164
+ var model, id;
165
+ return tslib_1.__generator(this, function (_a) {
166
+ switch (_a.label) {
167
+ case 0: return [4 /*yield*/, this.repo.create(item)];
168
+ case 1:
169
+ model = _a.sent();
170
+ return [4 /*yield*/, this.repo.save(model, options)];
171
+ case 2:
172
+ model = _a.sent();
173
+ id = model.id;
174
+ return [4 /*yield*/, this.repo.findOne({
175
+ where: { id: id },
176
+ })];
177
+ case 3:
178
+ model = _a.sent();
179
+ return [2 /*return*/, model];
180
+ }
181
+ });
182
+ });
183
+ };
184
+ /**
185
+ * alias to save
186
+ * -> it will actuall create new entity in db
187
+ * in oposite to typeorm create method
188
+ */
189
+ BaseRepository.prototype.create = function (item, options) {
190
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
191
+ return tslib_1.__generator(this, function (_a) {
192
+ return [2 /*return*/, this.save(item, options)];
193
+ });
194
+ });
195
+ };
196
+ BaseRepository.prototype.bulkSave = function (items, options) {
197
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
198
+ var models, index, item, model;
199
+ return tslib_1.__generator(this, function (_a) {
200
+ switch (_a.label) {
201
+ case 0:
202
+ models = [];
203
+ index = 0;
204
+ _a.label = 1;
205
+ case 1:
206
+ if (!(index < items.length)) return [3 /*break*/, 4];
207
+ item = items[index];
208
+ return [4 /*yield*/, this.save(item, options)];
209
+ case 2:
210
+ model = _a.sent();
211
+ models.push(model);
212
+ _a.label = 3;
213
+ case 3:
214
+ index++;
215
+ return [3 /*break*/, 1];
216
+ case 4: return [2 /*return*/, models];
217
+ }
218
+ });
219
+ });
220
+ };
221
+ BaseRepository.prototype.bulkCreate = function (items, options) {
222
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
223
+ return tslib_1.__generator(this, function (_a) {
224
+ return [2 /*return*/, this.bulkSave(items, options)];
225
+ });
226
+ });
227
+ };
228
+ //#region old typeorm version
229
+ // /**
230
+ // * Creates a new entity instance.
231
+ // */
232
+ // create(): Entity;
233
+ // /**
234
+ // * Creates new entities and copies all entity properties from given objects into their new entities.
235
+ // * Note that it copies only properties that are present in entity schema.
236
+ // */
237
+ // create(entityLikeArray: Entity[]): Entity[];
238
+ // /**
239
+ // * Creates a new entity instance and copies all entity properties from this object into a new entity.
240
+ // * Note that it copies only properties that are present in entity schema.
241
+ // */
242
+ // create(entityLike: Entity): Entity;
243
+ /**
244
+ * Saves all given entities in the database.
245
+ * If entities do not exist in the database then inserts, otherwise updates.
246
+ */
247
+ // save<T extends DeepPartial<Entity>>(
248
+ // entities: T[],
249
+ // options: SaveOptions & {
250
+ // reload: false;
251
+ // },
252
+ // ): Promise<T[]>;
253
+ // /**
254
+ // * Saves all given entities in the database.
255
+ // * If entities do not exist in the database then inserts, otherwise updates.
256
+ // */
257
+ // save<T extends DeepPartial<Entity>>(
258
+ // entities: T[],
259
+ // options?: SaveOptions,
260
+ // ): Promise<(T & Entity)[]>;
261
+ // /**
262
+ // * Saves a given entity in the database.
263
+ // * If entity does not exist in the database then inserts, otherwise updates.
264
+ // */
265
+ // save<T extends DeepPartial<Entity>>(
266
+ // entity: T,
267
+ // options: SaveOptions & {
268
+ // reload: false;
269
+ // },
270
+ // ): Promise<T>;
271
+ // /**
272
+ // * Saves a given entity in the database.
273
+ // * If entity does not exist in the database then inserts, otherwise updates.
274
+ // */
275
+ // save<T extends DeepPartial<Entity>>(
276
+ // entity: T,
277
+ // options?: SaveOptions,
278
+ // ): Promise<T & Entity> {
279
+ // return this.repo.save(entity, options);
280
+ // }
281
+ //#endregion
282
+ //#endregion
283
+ //#region crud operations / typeorm / merge
284
+ /**
285
+ * Merges multiple entities (or entity-like objects) into a given entity.
286
+ */
287
+ BaseRepository.prototype.merge = function (mergeIntoEntity) {
288
+ var _a;
289
+ var entityLikes = [];
290
+ for (var _i = 1; _i < arguments.length; _i++) {
291
+ entityLikes[_i - 1] = arguments[_i];
292
+ }
293
+ return (_a = this.repo).merge.apply(_a, tslib_1.__spreadArray([mergeIntoEntity], tslib_1.__read(entityLikes), false));
294
+ };
295
+ //#endregion
296
+ //#region crud operations / typeorm / preload
297
+ /**
298
+ * Creates a new entity from the given plain javascript object. If entity already exist in the database, then
299
+ * it loads it (and everything related to it), replaces all values with the new ones from the given object
300
+ * and returns this new entity. This new entity is actually a loaded from the db entity with all properties
301
+ * replaced from the new object.
302
+ *
303
+ * Note that given entity-like object must have an entity id / primary key to find entity by.
304
+ * Returns undefined if entity with given id was not found.
305
+ */
306
+ BaseRepository.prototype.preload = function (entityLike) {
307
+ return this.repo.preload(entityLike);
308
+ };
309
+ //#endregion
310
+ //#region crud operations / typeorm / remove (delete) & bulk remove (delete)
311
+ /**
312
+ * Removes a given entities from the database.
313
+ */
314
+ BaseRepository.prototype.remove = function (idOrEntity) {
315
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
316
+ var deletedEntity, idCopy;
317
+ return tslib_1.__generator(this, function (_a) {
318
+ switch (_a.label) {
319
+ case 0:
320
+ //#region @websqlFunc
321
+ if (tnp_core_2._.isObject(idOrEntity)) {
322
+ idOrEntity = idOrEntity.id;
323
+ }
324
+ return [4 /*yield*/, this.repo.findOne({
325
+ where: { id: idOrEntity },
326
+ })];
327
+ case 1:
328
+ deletedEntity = _a.sent();
329
+ idCopy = deletedEntity.id;
330
+ return [4 /*yield*/, this.repo.remove(deletedEntity)];
331
+ case 2:
332
+ _a.sent();
333
+ deletedEntity.id = idCopy;
334
+ return [2 /*return*/, deletedEntity];
335
+ }
336
+ });
337
+ });
338
+ };
339
+ /**
340
+ * alias to remove
341
+ */
342
+ BaseRepository.prototype.delete = function (idOrEntity) {
343
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
344
+ return tslib_1.__generator(this, function (_a) {
345
+ return [2 /*return*/, this.remove(idOrEntity)];
346
+ });
347
+ });
348
+ };
349
+ /**
350
+ * alias to removeById
351
+ */
352
+ BaseRepository.prototype.deleteById = function (id) {
353
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
354
+ return tslib_1.__generator(this, function (_a) {
355
+ return [2 /*return*/, this.remove(id)];
356
+ });
357
+ });
358
+ };
359
+ BaseRepository.prototype.bulkRemove = function (idsOrEntities) {
360
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
361
+ var models, index, id, model;
362
+ return tslib_1.__generator(this, function (_a) {
363
+ switch (_a.label) {
364
+ case 0:
365
+ //#region @websqlFunc
366
+ idsOrEntities = idsOrEntities.map(function (id) {
367
+ return tnp_core_2._.isObject(id) ? id.id : id;
368
+ });
369
+ models = [];
370
+ index = 0;
371
+ _a.label = 1;
372
+ case 1:
373
+ if (!(index < idsOrEntities.length)) return [3 /*break*/, 4];
374
+ id = idsOrEntities[index];
375
+ return [4 /*yield*/, this.remove(id)];
376
+ case 2:
377
+ model = _a.sent();
378
+ models.push(model);
379
+ _a.label = 3;
380
+ case 3:
381
+ index++;
382
+ return [3 /*break*/, 1];
383
+ case 4: return [2 /*return*/, models];
384
+ }
385
+ });
386
+ });
387
+ };
388
+ BaseRepository.prototype.bulkDelete = function (ids) {
389
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
390
+ return tslib_1.__generator(this, function (_a) {
391
+ return [2 /*return*/, this.bulkRemove(ids)];
392
+ });
393
+ });
394
+ };
395
+ /**
396
+ * Records the delete date of a given entity.
397
+ */
398
+ BaseRepository.prototype.softRemove = function (entity, options) {
399
+ return this.repo.softRemove(entity, options);
400
+ };
401
+ /**
402
+ * Recovers a given entity in the database.
403
+ */
404
+ BaseRepository.prototype.recover = function (entity, options) {
405
+ return this.repo.recover(entity, options);
406
+ };
407
+ //#endregion
408
+ //#region crud operations / typeorm / insert
409
+ /**
410
+ * Inserts a given entity into the database.
411
+ * Unlike save method executes a primitive operation without cascades, relations and other operations included.
412
+ * Executes fast and efficient INSERT query.
413
+ * Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
414
+ */
415
+ BaseRepository.prototype.insert = function (entity) {
416
+ return this.repo.insert(entity);
417
+ };
418
+ //#endregion
419
+ //#region crud operations / typeorm / update & build update
420
+ BaseRepository.prototype.update = function (item) {
421
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
422
+ var id;
423
+ return tslib_1.__generator(this, function (_a) {
424
+ switch (_a.label) {
425
+ case 0:
426
+ id = item.id;
427
+ return [4 /*yield*/, this.updateById(id, item)];
428
+ case 1: return [2 /*return*/, _a.sent()];
429
+ }
430
+ });
431
+ });
432
+ };
433
+ BaseRepository.prototype.updateById = function (id, item) {
434
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
435
+ var allowedPropsToUpdate, _loop_1, this_1, key, i, key, toSet, model;
436
+ var _a;
437
+ return tslib_1.__generator(this, function (_b) {
438
+ switch (_b.label) {
439
+ case 0:
440
+ allowedPropsToUpdate = [];
441
+ _loop_1 = function (key) {
442
+ if (tnp_core_2._.isObject(item) &&
443
+ item.hasOwnProperty(key) &&
444
+ typeof item[key] !== 'object' &&
445
+ !tnp_core_2._.isUndefined(this_1.repo.metadata.ownColumns.find(function (c) { return c.propertyName === key; }))) {
446
+ allowedPropsToUpdate.push(key);
447
+ }
448
+ };
449
+ this_1 = this;
450
+ for (key in item) {
451
+ _loop_1(key);
452
+ }
453
+ i = 0;
454
+ _b.label = 1;
455
+ case 1:
456
+ if (!(i < allowedPropsToUpdate.length)) return [3 /*break*/, 4];
457
+ key = allowedPropsToUpdate[i];
458
+ if (!!INDEX_KEYS_NO_FOR_UPDATE.includes(key.toLowerCase())) return [3 /*break*/, 3];
459
+ toSet = item[key];
460
+ // const tableName = tableNameFrom(this.entity as any);
461
+ return [4 /*yield*/, this.repo.update({
462
+ id: id,
463
+ }, (_a = {},
464
+ _a[key] = toSet,
465
+ _a))];
466
+ case 2:
467
+ // const tableName = tableNameFrom(this.entity as any);
468
+ _b.sent();
469
+ _b.label = 3;
470
+ case 3:
471
+ i++;
472
+ return [3 /*break*/, 1];
473
+ case 4: return [4 /*yield*/, this.repo.findOne({
474
+ where: { id: id },
475
+ })];
476
+ case 5:
477
+ model = _b.sent();
478
+ return [2 /*return*/, model];
479
+ }
480
+ });
481
+ });
482
+ };
483
+ BaseRepository.prototype.bulkUpdate = function (items) {
484
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
485
+ var models, index, item, id, model;
486
+ return tslib_1.__generator(this, function (_a) {
487
+ switch (_a.label) {
488
+ case 0:
489
+ models = [];
490
+ index = 0;
491
+ _a.label = 1;
492
+ case 1:
493
+ if (!(index < items.length)) return [3 /*break*/, 4];
494
+ item = items[index];
495
+ id = item.id;
496
+ return [4 /*yield*/, this.updateById(id, item)];
497
+ case 2:
498
+ model = _a.sent();
499
+ models.push(model);
500
+ _a.label = 3;
501
+ case 3:
502
+ index++;
503
+ return [3 /*break*/, 1];
504
+ case 4: return [2 /*return*/, { models: models }];
505
+ }
506
+ });
507
+ });
508
+ };
509
+ //#region tpeorm update version
510
+ // this version suck and will not return update entity
511
+ // /**
512
+ // * Updates entity partially. Entity can be found by a given conditions.
513
+ // * Unlike save method executes a primitive operation without cascades, relations and other operations included.
514
+ // * Executes fast and efficient UPDATE query.
515
+ // * Does not check if entity exist in the database.
516
+ // */
517
+ // update(
518
+ // criteria:
519
+ // | string
520
+ // | string[]
521
+ // | number
522
+ // | number[]
523
+ // | Date
524
+ // | Date[]
525
+ // | ObjectID
526
+ // | ObjectID[]
527
+ // | FindOptionsWhere<Entity>,
528
+ // partialEntity: QueryDeepPartialEntity<Entity>,
529
+ // ): Promise<UpdateResult> {
530
+ // return this.repo.update(criteria, partialEntity);
531
+ // }
532
+ //#endregion
533
+ //#endregion
534
+ //#region crud operations / typeorm / upsert
535
+ /**
536
+ * Inserts a given entity into the database, unless a unique constraint conflicts then updates the entity
537
+ * Unlike save method executes a primitive operation without cascades, relations and other operations included.
538
+ * Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
539
+ */
540
+ BaseRepository.prototype.upsert = function (entityOrEntities, conflictPathsOrOptions) {
541
+ return this.repo.upsert(entityOrEntities, conflictPathsOrOptions);
542
+ };
543
+ //#endregion
544
+ //#region crud operations / typeorm / soft delete
545
+ /**
546
+ * Records the delete date of entities by a given criteria.
547
+ * Unlike save method executes a primitive operation without cascades, relations and other operations included.
548
+ * Executes fast and efficient SOFT-DELETE query.
549
+ * Does not check if entity exist in the database.
550
+ */
551
+ BaseRepository.prototype.softDelete = function (criteria) {
552
+ return this.repo.softDelete(criteria);
553
+ };
554
+ //#endregion
555
+ //#region crud operations / typeorm / restore
556
+ /**
557
+ * Restores entities by a given criteria.
558
+ * Unlike save method executes a primitive operation without cascades, relations and other operations included.
559
+ * Executes fast and efficient SOFT-DELETE query.
560
+ * Does not check if entity exist in the database.
561
+ */
562
+ BaseRepository.prototype.restore = function (criteria) {
563
+ return this.repo.restore(criteria);
564
+ };
565
+ //#endregion
566
+ //#region crud operations / typeorm / count
567
+ /**
568
+ * Counts entities that match given options.
569
+ * Useful for pagination.
570
+ */
571
+ BaseRepository.prototype.count = function (options) {
572
+ return this.repo.count(options);
573
+ };
574
+ //#endregion
575
+ //#region crud operations / typeorm / count by
576
+ /**
577
+ * Counts entities that match given conditions.
578
+ * Useful for pagination.
579
+ */
580
+ BaseRepository.prototype.countBy = function (where) {
581
+ return this.repo.countBy(where);
582
+ };
583
+ //#endregion
584
+ //#region crud operations / typeorm / find
585
+ /**
586
+ * Finds entities that match given find options.
587
+ */
588
+ BaseRepository.prototype.find = function (options) {
589
+ return this.repo.find(options);
590
+ };
591
+ //#endregion
592
+ //#region crud operations / typeorm / find by
593
+ /**
594
+ * Finds entities that match given find options.
595
+ */
596
+ BaseRepository.prototype.findBy = function (where) {
597
+ return this.repo.findBy(where);
598
+ };
599
+ //#endregion
600
+ //#region crud operations / typeorm / find and count
601
+ // async findAndCount(options: { take: number; skip: number }) {
602
+ // const { take, skip } = options;
603
+ // const [result, total] = await this.repo.findAndCount({
604
+ // // where: { name: Like('%' + keyword + '%') },
605
+ // // order: { name: "DESC" },
606
+ // take: take,
607
+ // skip: skip,
608
+ // });
609
+ // return { result, total };
610
+ // }
611
+ //
612
+ /**
613
+ * Finds entities that match given find options.
614
+ * Also counts all entities that match given conditions,
615
+ * but ignores pagination settings (from and take options).
616
+ */
617
+ BaseRepository.prototype.findAndCount = function (options) {
618
+ return this.repo.findAndCount(options);
619
+ };
620
+ //#endregion
621
+ //#region crud operations / typeorm / find and count by
622
+ /**
623
+ * Finds entities that match given WHERE conditions.
624
+ * Also counts all entities that match given conditions,
625
+ * but ignores pagination settings (from and take options).
626
+ */
627
+ BaseRepository.prototype.findAndCountBy = function (where) {
628
+ return this.repo.findAndCountBy(where);
629
+ };
630
+ //#endregion
631
+ //#region crud operations / typeorm / find by ids
632
+ /**
633
+ * Finds entities with ids.
634
+ * Optionally find options or conditions can be applied.
635
+ *
636
+ * @deprecated use `findBy` method instead in conjunction with `In` operator, for example:
637
+ *
638
+ * .findBy({
639
+ * id: In([1, 2, 3])
640
+ * })
641
+ */
642
+ BaseRepository.prototype.findByIds = function (ids) {
643
+ return this.repo.findByIds(ids);
644
+ };
645
+ //#endregion
646
+ //#region crud operations / typeorm / find one
647
+ /**
648
+ * Finds first entity by a given find options.
649
+ * If entity was not found in the database - returns null.
650
+ */
651
+ BaseRepository.prototype.findOne = function (options) {
652
+ return this.repo.findOne(options);
653
+ };
654
+ //#endregion
655
+ //#region crud operations / typeorm / find one by
656
+ /**
657
+ * Finds first entity that matches given where condition.
658
+ * If entity was not found in the database - returns null.
659
+ */
660
+ BaseRepository.prototype.findOneBy = function (where) {
661
+ return this.repo.findOneBy(where);
662
+ };
663
+ //#endregion
664
+ //#region crud operations / typeorm / find one or fail
665
+ /**
666
+ * Finds first entity that matches given id.
667
+ * If entity was not found in the database - returns null.
668
+ *
669
+ * @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:
670
+ *
671
+ * .findOneBy({
672
+ * id: 1 // where "id" is your primary column name
673
+ * })
674
+ */
675
+ BaseRepository.prototype.findOneById = function (id) {
676
+ return this.repo.findOneById(id);
677
+ };
678
+ //#endregion
679
+ //#region crud operations / typeorm / find one or fail
680
+ /**
681
+ * Finds first entity by a given find options.
682
+ * If entity was not found in the database - rejects with error.
683
+ */
684
+ BaseRepository.prototype.findOneOrFail = function (options) {
685
+ return this.repo.findOneOrFail(options);
686
+ };
687
+ //#endregion
688
+ //#region crud operations / typeorm / find one by or fail
689
+ /**
690
+ * Finds first entity that matches given where condition.
691
+ * If entity was not found in the database - rejects with error.
692
+ */
693
+ BaseRepository.prototype.findOneByOrFail = function (where) {
694
+ return this.repo.findOneByOrFail(where);
695
+ };
696
+ //#endregion
697
+ //#region crud operations / typeorm / query
698
+ /**
699
+ * Executes a raw SQL query and returns a raw database results.
700
+ * Raw query execution is supported only by relational databases (MongoDB is not supported).
701
+ */
702
+ BaseRepository.prototype.query = function (query, parameters) {
703
+ return this.repo.query(query, parameters);
704
+ };
705
+ //#endregion
706
+ //#region crud operations / typeorm / clear
707
+ /**
708
+ * Clears all the data from the given table/collection (truncates/drops it).
709
+ *
710
+ * Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
711
+ * @see https://stackoverflow.com/a/5972738/925151
712
+ */
713
+ BaseRepository.prototype.clear = function () {
714
+ return this.repo.clear();
715
+ };
716
+ //#endregion
717
+ //#region crud operations / typeorm / increment
718
+ /**
719
+ * Increments some column by provided value of the entities matched given conditions.
720
+ */
721
+ BaseRepository.prototype.increment = function (conditions, propertyPath, value) {
722
+ return this.repo.increment(conditions, propertyPath, value);
723
+ };
724
+ //#endregion
725
+ //#region crud operations / typeorm / decrement
726
+ /**
727
+ * Decrements some column by provided value of the entities matched given conditions.
728
+ */
729
+ BaseRepository.prototype.decrement = function (conditions, propertyPath, value) {
730
+ return this.repo.decrement(conditions, propertyPath, value);
731
+ };
732
+ //#endregion
733
+ //#region crud operations / get all
734
+ /**
735
+ * @deprecated use findAndCount instead
736
+ */
737
+ BaseRepository.prototype.getAll = function () {
738
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
739
+ var totalCount, models;
740
+ return tslib_1.__generator(this, function (_a) {
741
+ switch (_a.label) {
742
+ case 0: return [4 /*yield*/, this.repo.count()];
743
+ case 1:
744
+ totalCount = _a.sent();
745
+ return [4 /*yield*/, this.repo.find()];
746
+ case 2:
747
+ models = _a.sent();
748
+ // console.log('models', models);
749
+ // console.log('totalCount', totalCount);
750
+ return [2 /*return*/, { models: models, totalCount: totalCount }];
751
+ }
752
+ });
753
+ });
754
+ };
755
+ //#endregion
756
+ //#region crud operations / get by id
757
+ BaseRepository.prototype.getBy = function (id) {
758
+ return tslib_1.__awaiter(this, void 0, void 0, function () {
759
+ var model;
760
+ return tslib_1.__generator(this, function (_a) {
761
+ switch (_a.label) {
762
+ case 0: return [4 /*yield*/, this.repo.findOne({
763
+ where: { id: id },
764
+ })];
765
+ case 1: return [4 /*yield*/, _a.sent()];
766
+ case 2:
767
+ model = _a.sent();
768
+ return [2 /*return*/, model];
769
+ }
770
+ });
771
+ });
772
+ };
773
+ BaseRepository = tslib_1.__decorate([
774
+ (0, repository_decorator_1.TaonRepository)({ className: 'BaseRepository' }),
775
+ tslib_1.__metadata("design:paramtypes", [Function])
776
+ ], BaseRepository);
777
+ return BaseRepository;
778
+ }(base_injector_1.BaseInjector));
779
+ exports.BaseRepository = BaseRepository;
780
+ //# sourceMappingURL=base-repository.js.map