taon 21.0.55 → 21.0.56

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 (323) hide show
  1. package/README.md +159 -159
  2. package/bin/start.js +17 -17
  3. package/bin/taon +5 -5
  4. package/bin/taon-debug +5 -5
  5. package/bin/taon-debug-brk +4 -4
  6. package/browser/README.md +24 -24
  7. package/browser/fesm2022/taon-browser.mjs.map +1 -1
  8. package/browser/package.json +1 -1
  9. package/browser-prod/README.md +24 -24
  10. package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
  11. package/browser-prod/package.json +1 -1
  12. package/lib/build-info._auto-generated_.d.ts +1 -1
  13. package/lib/build-info._auto-generated_.js +1 -1
  14. package/lib/package.json +1 -1
  15. package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
  16. package/lib/ui/index.js +2 -2
  17. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  18. package/lib-prod/base-classes/base-abstract-entity.d.ts +7 -0
  19. package/lib-prod/base-classes/base-abstract-entity.js +32 -9
  20. package/lib-prod/base-classes/base-abstract-entity.js.map +1 -0
  21. package/lib-prod/base-classes/base-angular-service.d.ts +27 -0
  22. package/lib-prod/base-classes/base-angular-service.js +8 -3
  23. package/lib-prod/base-classes/base-angular-service.js.map +1 -0
  24. package/lib-prod/base-classes/base-class.d.ts +15 -0
  25. package/lib-prod/base-classes/base-class.js +15 -10
  26. package/lib-prod/base-classes/base-class.js.map +1 -0
  27. package/lib-prod/base-classes/base-context.d.ts +20 -0
  28. package/lib-prod/base-classes/base-context.js +13 -9
  29. package/lib-prod/base-classes/base-context.js.map +1 -0
  30. package/lib-prod/base-classes/base-controller.d.ts +84 -0
  31. package/lib-prod/base-classes/base-controller.js +45 -26
  32. package/lib-prod/base-classes/base-controller.js.map +1 -0
  33. package/lib-prod/base-classes/base-crud-controller.d.ts +28 -0
  34. package/lib-prod/base-classes/base-crud-controller.js +104 -50
  35. package/lib-prod/base-classes/base-crud-controller.js.map +1 -0
  36. package/lib-prod/base-classes/base-custom-repository.d.ts +3 -0
  37. package/lib-prod/base-classes/base-custom-repository.js +16 -6
  38. package/lib-prod/base-classes/base-custom-repository.js.map +1 -0
  39. package/lib-prod/base-classes/base-electron-service.d.ts +0 -0
  40. package/lib-prod/base-classes/base-electron-service.js +1 -0
  41. package/lib-prod/base-classes/base-electron-service.js.map +1 -0
  42. package/lib-prod/base-classes/base-entity.d.ts +16 -0
  43. package/lib-prod/base-classes/base-entity.js +16 -6
  44. package/lib-prod/base-classes/base-entity.js.map +1 -0
  45. package/lib-prod/base-classes/base-file-upload.middleware.d.ts +14 -0
  46. package/lib-prod/base-classes/base-file-upload.middleware.js +24 -14
  47. package/lib-prod/base-classes/base-file-upload.middleware.js.map +1 -0
  48. package/lib-prod/base-classes/base-injector.d.ts +67 -0
  49. package/lib-prod/base-classes/base-injector.js +27 -13
  50. package/lib-prod/base-classes/base-injector.js.map +1 -0
  51. package/lib-prod/base-classes/base-middleware.d.ts +38 -0
  52. package/lib-prod/base-classes/base-middleware.js +7 -2
  53. package/lib-prod/base-classes/base-middleware.js.map +1 -0
  54. package/lib-prod/base-classes/base-migration.d.ts +11 -0
  55. package/lib-prod/base-classes/base-migration.js +12 -7
  56. package/lib-prod/base-classes/base-migration.js.map +1 -0
  57. package/lib-prod/base-classes/base-provider.d.ts +8 -0
  58. package/lib-prod/base-classes/base-provider.js +7 -2
  59. package/lib-prod/base-classes/base-provider.js.map +1 -0
  60. package/lib-prod/base-classes/base-repository.d.ts +272 -0
  61. package/lib-prod/base-classes/base-repository.js +38 -21
  62. package/lib-prod/base-classes/base-repository.js.map +1 -0
  63. package/lib-prod/base-classes/base-subscriber-for-entity.d.ts +81 -0
  64. package/lib-prod/base-classes/base-subscriber-for-entity.js +16 -6
  65. package/lib-prod/base-classes/base-subscriber-for-entity.js.map +1 -0
  66. package/lib-prod/base-classes/base.d.ts +1 -0
  67. package/lib-prod/base-classes/base.js +3 -1
  68. package/lib-prod/base-classes/base.js.map +1 -0
  69. package/lib-prod/build-info._auto-generated_.d.ts +24 -0
  70. package/lib-prod/build-info._auto-generated_.js +10 -6
  71. package/lib-prod/build-info._auto-generated_.js.map +1 -0
  72. package/lib-prod/config/controller-config.d.ts +21 -0
  73. package/lib-prod/config/controller-config.js +9 -3
  74. package/lib-prod/config/controller-config.js.map +1 -0
  75. package/lib-prod/config/controller-options.d.ts +16 -0
  76. package/lib-prod/config/controller-options.js +7 -2
  77. package/lib-prod/config/controller-options.js.map +1 -0
  78. package/lib-prod/config/method-config.d.ts +39 -0
  79. package/lib-prod/config/method-config.js +6 -1
  80. package/lib-prod/config/method-config.js.map +1 -0
  81. package/lib-prod/config/param-config.d.ts +8 -0
  82. package/lib-prod/config/param-config.js +6 -1
  83. package/lib-prod/config/param-config.js.map +1 -0
  84. package/lib-prod/constants.d.ts +9 -0
  85. package/lib-prod/constants.js +6 -7
  86. package/lib-prod/constants.js.map +1 -0
  87. package/lib-prod/context-db-migrations.d.ts +17 -0
  88. package/lib-prod/context-db-migrations.js +76 -70
  89. package/lib-prod/context-db-migrations.js.map +1 -0
  90. package/lib-prod/create-context.d.ts +78 -0
  91. package/lib-prod/create-context.js +19 -13
  92. package/lib-prod/create-context.js.map +1 -0
  93. package/lib-prod/decorators/classes/controller-decorator.d.ts +5 -0
  94. package/lib-prod/decorators/classes/controller-decorator.js +10 -6
  95. package/lib-prod/decorators/classes/controller-decorator.js.map +1 -0
  96. package/lib-prod/decorators/classes/entity-decorator.d.ts +19 -0
  97. package/lib-prod/decorators/classes/entity-decorator.js +31 -16
  98. package/lib-prod/decorators/classes/entity-decorator.js.map +1 -0
  99. package/lib-prod/decorators/classes/middleware-decorator.d.ts +8 -0
  100. package/lib-prod/decorators/classes/middleware-decorator.js +15 -9
  101. package/lib-prod/decorators/classes/middleware-decorator.js.map +1 -0
  102. package/lib-prod/decorators/classes/migration-decorator.d.ts +7 -0
  103. package/lib-prod/decorators/classes/migration-decorator.js +14 -8
  104. package/lib-prod/decorators/classes/migration-decorator.js.map +1 -0
  105. package/lib-prod/decorators/classes/provider-decorator.d.ts +7 -0
  106. package/lib-prod/decorators/classes/provider-decorator.js +14 -8
  107. package/lib-prod/decorators/classes/provider-decorator.js.map +1 -0
  108. package/lib-prod/decorators/classes/repository-decorator.d.ts +7 -0
  109. package/lib-prod/decorators/classes/repository-decorator.js +14 -8
  110. package/lib-prod/decorators/classes/repository-decorator.js.map +1 -0
  111. package/lib-prod/decorators/classes/subscriber-decorator.d.ts +8 -0
  112. package/lib-prod/decorators/classes/subscriber-decorator.js +15 -8
  113. package/lib-prod/decorators/classes/subscriber-decorator.js.map +1 -0
  114. package/lib-prod/decorators/decorator-abstract-opt.d.ts +3 -0
  115. package/lib-prod/decorators/decorator-abstract-opt.js +6 -1
  116. package/lib-prod/decorators/decorator-abstract-opt.js.map +1 -0
  117. package/lib-prod/decorators/http/http-decorators.d.ts +3 -0
  118. package/lib-prod/decorators/http/http-decorators.js +6 -2
  119. package/lib-prod/decorators/http/http-decorators.js.map +1 -0
  120. package/lib-prod/decorators/http/http-methods-decorators.d.ts +70 -0
  121. package/lib-prod/decorators/http/http-methods-decorators.js +22 -12
  122. package/lib-prod/decorators/http/http-methods-decorators.js.map +1 -0
  123. package/lib-prod/decorators/http/http-params-decorators.d.ts +8 -0
  124. package/lib-prod/decorators/http/http-params-decorators.js +15 -7
  125. package/lib-prod/decorators/http/http-params-decorators.js.map +1 -0
  126. package/lib-prod/dependency-injection/di-container.d.ts +5 -0
  127. package/lib-prod/dependency-injection/di-container.js +7 -2
  128. package/lib-prod/dependency-injection/di-container.js.map +1 -0
  129. package/lib-prod/endpoint-context-storage.d.ts +11 -0
  130. package/lib-prod/endpoint-context-storage.js +11 -4
  131. package/lib-prod/endpoint-context-storage.js.map +1 -0
  132. package/lib-prod/endpoint-context.d.ts +197 -0
  133. package/lib-prod/endpoint-context.js +458 -433
  134. package/lib-prod/endpoint-context.js.map +1 -0
  135. package/lib-prod/entity-process.d.ts +39 -0
  136. package/lib-prod/entity-process.js +77 -61
  137. package/lib-prod/entity-process.js.map +1 -0
  138. package/lib-prod/env/env.angular-node-app.d.ts +64 -0
  139. package/lib-prod/env/env.angular-node-app.js +69 -64
  140. package/lib-prod/env/env.angular-node-app.js.map +1 -0
  141. package/lib-prod/env/env.docs-webapp.d.ts +64 -0
  142. package/lib-prod/env/env.docs-webapp.js +69 -64
  143. package/lib-prod/env/env.docs-webapp.js.map +1 -0
  144. package/lib-prod/env/env.electron-app.d.ts +64 -0
  145. package/lib-prod/env/env.electron-app.js +69 -64
  146. package/lib-prod/env/env.electron-app.js.map +1 -0
  147. package/lib-prod/env/env.mobile-app.d.ts +64 -0
  148. package/lib-prod/env/env.mobile-app.js +69 -64
  149. package/lib-prod/env/env.mobile-app.js.map +1 -0
  150. package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +64 -0
  151. package/lib-prod/env/env.npm-lib-and-cli-tool.js +69 -64
  152. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -0
  153. package/lib-prod/env/env.vscode-plugin.d.ts +64 -0
  154. package/lib-prod/env/env.vscode-plugin.js +69 -64
  155. package/lib-prod/env/env.vscode-plugin.js.map +1 -0
  156. package/lib-prod/env/index.d.ts +6 -0
  157. package/lib-prod/env/index.js +23 -6
  158. package/lib-prod/env/index.js.map +1 -0
  159. package/lib-prod/express-types.d.ts +1 -0
  160. package/lib-prod/express-types.js +3 -1
  161. package/lib-prod/express-types.js.map +1 -0
  162. package/lib-prod/formly/formly.models.d.ts +1 -0
  163. package/lib-prod/formly/formly.models.js +3 -1
  164. package/lib-prod/formly/formly.models.js.map +1 -0
  165. package/lib-prod/formly/fromly.d.ts +16 -0
  166. package/lib-prod/formly/fromly.js +33 -29
  167. package/lib-prod/formly/fromly.js.map +1 -0
  168. package/lib-prod/formly/type-from-entity.d.ts +20 -0
  169. package/lib-prod/formly/type-from-entity.js +24 -15
  170. package/lib-prod/formly/type-from-entity.js.map +1 -0
  171. package/lib-prod/get-response-value.d.ts +6 -0
  172. package/lib-prod/get-response-value.js +6 -1
  173. package/lib-prod/get-response-value.js.map +1 -0
  174. package/lib-prod/global-state/taon-global-state/index.d.ts +5 -0
  175. package/lib-prod/global-state/taon-global-state/index.js +22 -5
  176. package/lib-prod/global-state/taon-global-state/index.js.map +1 -0
  177. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.d.ts +19 -0
  178. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +18 -14
  179. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js.map +1 -0
  180. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.d.ts +2 -0
  181. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +7 -3
  182. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js.map +1 -0
  183. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.d.ts +11 -0
  184. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +38 -19
  185. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js.map +1 -0
  186. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.d.ts +7 -0
  187. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +41 -12
  188. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js.map +1 -0
  189. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.d.ts +3 -0
  190. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +16 -6
  191. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js.map +1 -0
  192. package/lib-prod/global-state/taon-global-state/taon-global-state.models.d.ts +28 -0
  193. package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +7 -3
  194. package/lib-prod/global-state/taon-global-state/taon-global-state.models.js.map +1 -0
  195. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.d.ts +3 -0
  196. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +16 -6
  197. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js.map +1 -0
  198. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.d.ts +9 -0
  199. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +23 -16
  200. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js.map +1 -0
  201. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.d.ts +7 -0
  202. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +20 -13
  203. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js.map +1 -0
  204. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.d.ts +2 -0
  205. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +8 -3
  206. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js.map +1 -0
  207. package/lib-prod/global-state/taon-transaction-registry/index.d.ts +10 -0
  208. package/lib-prod/global-state/taon-transaction-registry/index.js +27 -10
  209. package/lib-prod/global-state/taon-transaction-registry/index.js.map +1 -0
  210. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.d.ts +19 -0
  211. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +20 -16
  212. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js.map +1 -0
  213. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.d.ts +2 -0
  214. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +5 -1
  215. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js.map +1 -0
  216. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.d.ts +9 -0
  217. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +33 -18
  218. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js.map +1 -0
  219. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.d.ts +12 -0
  220. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +55 -14
  221. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js.map +1 -0
  222. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.d.ts +3 -0
  223. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +16 -6
  224. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js.map +1 -0
  225. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.d.ts +6 -0
  226. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +6 -2
  227. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js.map +1 -0
  228. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.d.ts +3 -0
  229. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +16 -6
  230. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js.map +1 -0
  231. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.d.ts +9 -0
  232. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +20 -13
  233. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js.map +1 -0
  234. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.d.ts +7 -0
  235. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +20 -13
  236. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js.map +1 -0
  237. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.d.ts +2 -0
  238. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +5 -1
  239. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js.map +1 -0
  240. package/lib-prod/helpers/class-helpers.d.ts +22 -0
  241. package/lib-prod/helpers/class-helpers.js +78 -60
  242. package/lib-prod/helpers/class-helpers.js.map +1 -0
  243. package/lib-prod/helpers/clone-obj.d.ts +1 -0
  244. package/lib-prod/helpers/clone-obj.js +12 -7
  245. package/lib-prod/helpers/clone-obj.js.map +1 -0
  246. package/lib-prod/helpers/taon-helpers.d.ts +16 -0
  247. package/lib-prod/helpers/taon-helpers.js +36 -21
  248. package/lib-prod/helpers/taon-helpers.js.map +1 -0
  249. package/lib-prod/index._auto-generated_.d.ts +0 -0
  250. package/lib-prod/index._auto-generated_.js +2 -1
  251. package/lib-prod/index._auto-generated_.js.map +1 -0
  252. package/lib-prod/index.d.ts +230 -0
  253. package/lib-prod/index.js +94 -73
  254. package/lib-prod/index.js.map +1 -0
  255. package/lib-prod/inject.d.ts +4 -0
  256. package/lib-prod/inject.js +9 -4
  257. package/lib-prod/inject.js.map +1 -0
  258. package/lib-prod/migrations/index.d.ts +1 -0
  259. package/lib-prod/migrations/index.js +18 -1
  260. package/lib-prod/migrations/index.js.map +1 -0
  261. package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
  262. package/lib-prod/migrations/migrations_index._auto-generated_.js +1 -0
  263. package/lib-prod/migrations/migrations_index._auto-generated_.js.map +1 -0
  264. package/lib-prod/models.d.ts +255 -0
  265. package/lib-prod/models.js +53 -14
  266. package/lib-prod/models.js.map +1 -0
  267. package/lib-prod/orm/columns.d.ts +32 -0
  268. package/lib-prod/orm/columns.js +70 -22
  269. package/lib-prod/orm/columns.js.map +1 -0
  270. package/lib-prod/orm/index.d.ts +1 -0
  271. package/lib-prod/orm/index.js +18 -1
  272. package/lib-prod/orm/index.js.map +1 -0
  273. package/lib-prod/package.json +1 -1
  274. package/lib-prod/realtime/realtime-client.d.ts +41 -0
  275. package/lib-prod/realtime/realtime-client.js +30 -24
  276. package/lib-prod/realtime/realtime-client.js.map +1 -0
  277. package/lib-prod/realtime/realtime-core.d.ts +40 -0
  278. package/lib-prod/realtime/realtime-core.js +51 -26
  279. package/lib-prod/realtime/realtime-core.js.map +1 -0
  280. package/lib-prod/realtime/realtime-server.d.ts +43 -0
  281. package/lib-prod/realtime/realtime-server.js +34 -28
  282. package/lib-prod/realtime/realtime-server.js.map +1 -0
  283. package/lib-prod/realtime/realtime-strategy/index.d.ts +4 -0
  284. package/lib-prod/realtime/realtime-strategy/index.js +21 -4
  285. package/lib-prod/realtime/realtime-strategy/index.js.map +1 -0
  286. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +80 -0
  287. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +41 -24
  288. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -0
  289. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.d.ts +14 -0
  290. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +34 -20
  291. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -0
  292. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +16 -0
  293. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +12 -6
  294. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -0
  295. package/lib-prod/realtime/realtime-strategy/realtime-strategy.d.ts +11 -0
  296. package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +7 -1
  297. package/lib-prod/realtime/realtime-strategy/realtime-strategy.js.map +1 -0
  298. package/lib-prod/realtime/realtime-subs-manager.d.ts +14 -0
  299. package/lib-prod/realtime/realtime-subs-manager.js +19 -13
  300. package/lib-prod/realtime/realtime-subs-manager.js.map +1 -0
  301. package/lib-prod/realtime/realtime.models.d.ts +25 -0
  302. package/lib-prod/realtime/realtime.models.js +3 -1
  303. package/lib-prod/realtime/realtime.models.js.map +1 -0
  304. package/lib-prod/symbols.d.ts +63 -0
  305. package/lib-prod/symbols.js +20 -19
  306. package/lib-prod/symbols.js.map +1 -0
  307. package/lib-prod/ui/index.d.ts +1 -0
  308. package/lib-prod/ui/index.js +5 -1
  309. package/lib-prod/ui/index.js.map +1 -0
  310. package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -0
  311. package/lib-prod/ui/taon-admin-mode-configuration/index.js +5 -1
  312. package/lib-prod/ui/taon-admin-mode-configuration/index.js.map +1 -0
  313. package/lib-prod/validators.d.ts +5 -0
  314. package/lib-prod/validators.js +20 -12
  315. package/lib-prod/validators.js.map +1 -0
  316. package/lib-prod.split-namespaces.json +86 -32
  317. package/package.json +1 -1
  318. package/websql/README.md +24 -24
  319. package/websql/fesm2022/taon-websql.mjs.map +1 -1
  320. package/websql/package.json +1 -1
  321. package/websql-prod/README.md +24 -24
  322. package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
  323. package/websql-prod/package.json +1 -1
@@ -0,0 +1,70 @@
1
+ import { Models__NS__ResponseTypeAxios as ModelsNg2Rest__NS__ResponseTypeAxios } from 'ng2-rest/lib-prod';
2
+ import { CoreModels__NS__ContentType } from 'tnp-core/lib-prod';
3
+ import { TaonBaseMiddleware } from '../../base-classes/base-middleware';
4
+ export type TaonMiddlewareInheritanceObj = {
5
+ [parentMiddlewaresName: string]: typeof TaonBaseMiddleware;
6
+ };
7
+ export type TaonMiddlewareFunction = (options: {
8
+ /**
9
+ * middlewares inherited from parent class
10
+ */
11
+ parentMiddlewares: TaonMiddlewareInheritanceObj;
12
+ /**
13
+ * Get real class name - needed when code is minified
14
+ */
15
+ className: (middlewareClass: Function) => string;
16
+ }) => TaonMiddlewareInheritanceObj;
17
+ export interface TaonHttpDecoratorOptions {
18
+ /**
19
+ * @deprecated don't use in production - keep stuff encapsulated
20
+ * normally path is generated from method name and its params
21
+ */
22
+ path?: string;
23
+ /**
24
+ * If true, the path will be global
25
+ *
26
+ * ! BE CAREFUL ! global path IS NOT GLOBAL inside dockerized app
27
+ * (/api/contextName is automatically added to global path in docker)
28
+ *
29
+ * @deprecated don't use in production - keep stuff encapsulated
30
+ */
31
+ pathIsGlobal?: boolean;
32
+ overrideContentType?: CoreModels__NS__ContentType;
33
+ overrideResponseType?: ModelsNg2Rest__NS__ResponseTypeAxios;
34
+ /**
35
+ * Express will send response as HTML string with proper headers
36
+ */
37
+ overrideExpressSendAsHtml?: boolean;
38
+ middlewares?: TaonMiddlewareFunction;
39
+ }
40
+ export declare function GET(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
41
+ /**
42
+ * Method for sending html website from text
43
+ * Example
44
+ *
45
+ * ```ts
46
+ * ...
47
+ * // in your taon controller
48
+ * ..Taon.Http.HTML()
49
+ * sendHtmlDummyWebsite(): Taon__NS__ResponseHtml {
50
+ * return `
51
+ <html>
52
+ <head>
53
+ <title>Dummy website</title>
54
+ </head>
55
+ <body>
56
+ <h1>This is dummy website</h1>
57
+ <p>Served as HTML string from Taon controller method</p>
58
+ </body>
59
+ </html>
60
+ * `; *
61
+ * }
62
+ * ...
63
+ * ```
64
+ */
65
+ export declare function HTML(pathOrOptions?: Pick<TaonHttpDecoratorOptions, 'path' | 'pathIsGlobal'>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
66
+ export declare function HEAD(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
67
+ export declare function POST(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
68
+ export declare function PUT(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
69
+ export declare function PATCH(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
70
+ export declare function DELETE(pathOrOptions?: string | TaonHttpDecoratorOptions, pathIsGlobal?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
@@ -1,7 +1,16 @@
1
- import { ___NS__isString } from 'tnp-core/lib-prod';
2
- import { ClassHelpers__NS__ensureMethodConfig } from '../../helpers/class-helpers';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET = GET;
4
+ exports.HTML = HTML;
5
+ exports.HEAD = HEAD;
6
+ exports.POST = POST;
7
+ exports.PUT = PUT;
8
+ exports.PATCH = PATCH;
9
+ exports.DELETE = DELETE;
10
+ const lib_prod_1 = require("tnp-core/lib-prod");
11
+ const class_helpers_1 = require("../../helpers/class-helpers");
3
12
  const metaReq = (method, path, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal) => {
4
- const methodConfig = ClassHelpers__NS__ensureMethodConfig(target, propertyKey);
13
+ const methodConfig = (0, class_helpers_1.ClassHelpers__NS__ensureMethodConfig)(target, propertyKey);
5
14
  let options;
6
15
  if (typeof pathOrOptions === 'object') {
7
16
  options = pathOrOptions;
@@ -22,7 +31,7 @@ const metaReq = (method, path, target, propertyKey, descriptor, pathOrOptions, p
22
31
  if (methodConfig.parameters.hasOwnProperty(key)) {
23
32
  const element = methodConfig.parameters[key];
24
33
  if (element.paramType === 'Path' &&
25
- ___NS__isString(element.paramName) &&
34
+ (0, lib_prod_1.___NS__isString)(element.paramName) &&
26
35
  element.paramName.trim().length > 0) {
27
36
  paramsPathConcatedPath += `/${element.paramName}/:${element.paramName}`;
28
37
  }
@@ -39,7 +48,7 @@ const metaReq = (method, path, target, propertyKey, descriptor, pathOrOptions, p
39
48
  methodConfig.responseType = overrideResponseType;
40
49
  methodConfig.overrideExpressSendAsHtml = overrideExpressSendAsHtml;
41
50
  };
42
- export function GET(pathOrOptions, pathIsGlobal = false) {
51
+ function GET(pathOrOptions, pathIsGlobal = false) {
43
52
  return function (target, propertyKey, descriptor) {
44
53
  metaReq('get', pathOrOptions, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal);
45
54
  };
@@ -52,7 +61,7 @@ export function GET(pathOrOptions, pathIsGlobal = false) {
52
61
  * ...
53
62
  * // in your taon controller
54
63
  * ..Taon.Http.HTML()
55
- * sendHtmlDummyWebsite(): Taon.ResponseHtml {
64
+ * sendHtmlDummyWebsite(): Taon__NS__ResponseHtml {
56
65
  * return `
57
66
  <html>
58
67
  <head>
@@ -68,35 +77,36 @@ export function GET(pathOrOptions, pathIsGlobal = false) {
68
77
  * ...
69
78
  * ```
70
79
  */
71
- export function HTML(pathOrOptions) {
80
+ function HTML(pathOrOptions) {
72
81
  return function (target, propertyKey, descriptor) {
73
82
  const opt = pathOrOptions;
74
83
  opt.overrideExpressSendAsHtml = true;
75
84
  metaReq('get', opt, target, propertyKey, descriptor, pathOrOptions, opt.pathIsGlobal);
76
85
  };
77
86
  }
78
- export function HEAD(pathOrOptions, pathIsGlobal = false) {
87
+ function HEAD(pathOrOptions, pathIsGlobal = false) {
79
88
  return function (target, propertyKey, descriptor) {
80
89
  metaReq('head', pathOrOptions, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal);
81
90
  };
82
91
  }
83
- export function POST(pathOrOptions, pathIsGlobal = false) {
92
+ function POST(pathOrOptions, pathIsGlobal = false) {
84
93
  return function (target, propertyKey, descriptor) {
85
94
  metaReq('post', pathOrOptions, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal);
86
95
  };
87
96
  }
88
- export function PUT(pathOrOptions, pathIsGlobal = false) {
97
+ function PUT(pathOrOptions, pathIsGlobal = false) {
89
98
  return function (target, propertyKey, descriptor) {
90
99
  metaReq('put', pathOrOptions, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal);
91
100
  };
92
101
  }
93
- export function PATCH(pathOrOptions, pathIsGlobal = false) {
102
+ function PATCH(pathOrOptions, pathIsGlobal = false) {
94
103
  return function (target, propertyKey, descriptor) {
95
104
  metaReq('patch', pathOrOptions, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal);
96
105
  };
97
106
  }
98
- export function DELETE(pathOrOptions, pathIsGlobal = false) {
107
+ function DELETE(pathOrOptions, pathIsGlobal = false) {
99
108
  return function (target, propertyKey, descriptor) {
100
109
  metaReq('delete', pathOrOptions, target, propertyKey, descriptor, pathOrOptions, pathIsGlobal);
101
110
  };
102
111
  }
112
+ //# sourceMappingURL=http-methods-decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-methods-decorators.js","sourceRoot":"","sources":[""],"names":[],"mappings":"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"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @deprecated use Taon.Http.Param.Path (is more safe and cleaner)
3
+ */
4
+ export declare function Path(name: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
5
+ export declare function Query(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
6
+ export declare function Cookie(name: string, expireInSecond?: number): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
7
+ export declare function Header(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
8
+ export declare function Body(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
@@ -1,6 +1,13 @@
1
- import { ClassHelpers__NS__ensureMethodConfig } from '../../helpers/class-helpers';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Path = Path;
4
+ exports.Query = Query;
5
+ exports.Cookie = Cookie;
6
+ exports.Header = Header;
7
+ exports.Body = Body;
8
+ const class_helpers_1 = require("../../helpers/class-helpers");
2
9
  function metaParam(param, name, expire, defaultValue = undefined, target, propertyKey, parameterIndex) {
3
- const methodCfg = ClassHelpers__NS__ensureMethodConfig(target, propertyKey);
10
+ const methodCfg = (0, class_helpers_1.ClassHelpers__NS__ensureMethodConfig)(target, propertyKey);
4
11
  const nameKey = name ? name : param;
5
12
  // const key = name || `${param}_${parameterIndex}`;
6
13
  methodCfg.parameters[nameKey] = {
@@ -15,28 +22,29 @@ function metaParam(param, name, expire, defaultValue = undefined, target, proper
15
22
  /**
16
23
  * @deprecated use Taon.Http.Param.Path (is more safe and cleaner)
17
24
  */
18
- export function Path(name) {
25
+ function Path(name) {
19
26
  return function (target, propertyKey, parameterIndex) {
20
27
  metaParam('Path', name, undefined, {}, target, propertyKey, parameterIndex);
21
28
  };
22
29
  }
23
- export function Query(name) {
30
+ function Query(name) {
24
31
  return function (target, propertyKey, parameterIndex) {
25
32
  metaParam('Query', name, undefined, {}, target, propertyKey, parameterIndex);
26
33
  };
27
34
  }
28
- export function Cookie(name, expireInSecond = 3600) {
35
+ function Cookie(name, expireInSecond = 3600) {
29
36
  return function (target, propertyKey, parameterIndex) {
30
37
  metaParam('Cookie', name, expireInSecond, {}, target, propertyKey, parameterIndex);
31
38
  };
32
39
  }
33
- export function Header(name) {
40
+ function Header(name) {
34
41
  return function (target, propertyKey, parameterIndex) {
35
42
  metaParam('Header', name, undefined, {}, target, propertyKey, parameterIndex);
36
43
  };
37
44
  }
38
- export function Body(name) {
45
+ function Body(name) {
39
46
  return function (target, propertyKey, parameterIndex) {
40
47
  metaParam('Body', name, undefined, {}, target, propertyKey, parameterIndex);
41
48
  };
42
49
  }
50
+ //# sourceMappingURL=http-params-decorators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-params-decorators.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAgCA,oBAQC;AAED,sBAgBC;AAED,wBAgBC;AAED,wBAgBC;AAED,oBAQC;AAtGD,+DAA+hB;AAI/hB,SAAS,SAAS,CAChB,KAAgC,EAChC,IAAY,EACZ,MAAc,EACd,YAAY,GAAG,SAAS,EACxB,MAAgB,EAChB,WAA4B,EAC5B,cAAsB;IAEtB,MAAM,SAAS,GAAG,IAAA,oDAAoC,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACpC,oDAAoD;IACpD,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG;QAC9B,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,YAAY;QACzB,eAAe,EAAE,MAAM;KACxB,CAAC;IAEF,+CAA+C;AACjD,CAAC;AAED;;GAEG;AACH,SAAgB,IAAI,CAAC,IAAY;IAC/B,OAAO,UACL,MAAW,EACX,WAA4B,EAC5B,cAAsB;QAEtB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC9E,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,KAAK,CAAC,IAAa;IACjC,OAAO,UACL,MAAW,EACX,WAA4B,EAC5B,cAAsB;QAEtB,SAAS,CACP,OAAO,EACP,IAAI,EACJ,SAAS,EACT,EAAE,EACF,MAAM,EACN,WAAW,EACX,cAAc,CACf,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,MAAM,CAAC,IAAY,EAAE,iBAAyB,IAAI;IAChE,OAAO,UACL,MAAW,EACX,WAA4B,EAC5B,cAAsB;QAEtB,SAAS,CACP,QAAQ,EACR,IAAI,EACJ,cAAc,EACd,EAAE,EACF,MAAM,EACN,WAAW,EACX,cAAc,CACf,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,MAAM,CAAC,IAAa;IAClC,OAAO,UACL,MAAW,EACX,WAA4B,EAC5B,cAAsB;QAEtB,SAAS,CACP,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,EAAE,EACF,MAAM,EACN,WAAW,EACX,cAAc,CACf,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,IAAI,CAAC,IAAa;IAChC,OAAO,UACL,MAAW,EACX,WAA4B,EAC5B,cAAsB;QAEtB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC9E,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare class DITaonContainer {
2
+ private static instances;
3
+ static resolve<T>(target: Function): T;
4
+ static inject<T>(target: new (...args: any[]) => T): T;
5
+ }
@@ -1,5 +1,8 @@
1
- export class DITaonContainer {
2
- static { this.instances = new Map(); }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DITaonContainer = void 0;
4
+ class DITaonContainer {
5
+ static instances = new Map();
3
6
  static resolve(target) {
4
7
  if (DITaonContainer.instances.has(target)) {
5
8
  return DITaonContainer.instances.get(target);
@@ -28,3 +31,5 @@ export class DITaonContainer {
28
31
  });
29
32
  }
30
33
  }
34
+ exports.DITaonContainer = DITaonContainer;
35
+ //# sourceMappingURL=di-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di-container.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,MAAa,eAAe;IAClB,MAAM,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;IAErC,MAAM,CAAC,OAAO,CAAI,MAAgB;QAChC,IAAI,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,OAAO,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC/C,CAAC;QAED,yEAAyE;QACzE,MAAM,UAAU,GAAG,EAAE,CAAC,CAAC,sDAAsD;QAE7E,MAAM,QAAQ,GAAG,IAAK,MAAc,CAAC,GAAG,UAAU,CAAC,CAAC;QACpD,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAChD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAM,CAAI,MAAiC;QAChD,OAAO,IAAI,KAAK,CACd,EAAE,EACF;YACE,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;gBACnB,IAAI,QAAQ,GACV,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC;oBACrC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClC,OAAO,OAAO,QAAQ,CAAC,QAAQ,CAAC,KAAK,UAAU;oBAC7C,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;oBACnC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACzB,CAAC;YACD,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;gBAC1B,IAAI,QAAQ,GACV,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC;oBACrC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAClC,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;gBAC3B,OAAO,IAAI,CAAC;YACd,CAAC;SACF,CACG,CAAC;IACT,CAAC;;AArCH,0CAsCC"}
@@ -0,0 +1,11 @@
1
+ import type { EndpointContext } from './endpoint-context';
2
+ export declare class ContextsEndpointStorage {
3
+ SPECIAL_APP_READY_MESSAGE: string;
4
+ private taonEndpointContexts;
5
+ private static instance;
6
+ private constructor();
7
+ static get Instance(): ContextsEndpointStorage;
8
+ set(context: EndpointContext): void;
9
+ get arr(): EndpointContext[];
10
+ getBy(context: Partial<EndpointContext> | string): EndpointContext | undefined;
11
+ }
@@ -1,8 +1,13 @@
1
- import { CoreModels__NS__SPECIAL_APP_READY_MESSAGE } from 'tnp-core/lib-prod';
2
- export class ContextsEndpointStorage {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContextsEndpointStorage = void 0;
4
+ const lib_prod_1 = require("tnp-core/lib-prod");
5
+ class ContextsEndpointStorage {
6
+ SPECIAL_APP_READY_MESSAGE = lib_prod_1.CoreModels__NS__SPECIAL_APP_READY_MESSAGE;
7
+ taonEndpointContexts = new Map();
8
+ //#region singleton
9
+ static instance;
3
10
  constructor() {
4
- this.SPECIAL_APP_READY_MESSAGE = CoreModels__NS__SPECIAL_APP_READY_MESSAGE;
5
- this.taonEndpointContexts = new Map();
6
11
  // Private constructor to prevent direct instantiation
7
12
  }
8
13
  static get Instance() {
@@ -27,5 +32,7 @@ export class ContextsEndpointStorage {
27
32
  return this.taonEndpointContexts.get(context.contextName);
28
33
  }
29
34
  }
35
+ exports.ContextsEndpointStorage = ContextsEndpointStorage;
30
36
  // TODO QUICK_FIX @LAST encapsulate this => move to separate package
31
37
  globalThis['$$$ContextsEndpointStorage$$$'] = ContextsEndpointStorage.Instance;
38
+ //# sourceMappingURL=endpoint-context-storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint-context-storage.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,gDAA40D;AAI50D,MAAa,uBAAuB;IAClC,yBAAyB,GAAG,oDAAyC,CAAC;IAC9D,oBAAoB,GAAG,IAAI,GAAG,EAA2B,CAAC;IAElE,mBAAmB;IACX,MAAM,CAAC,QAAQ,CAA0B;IAEjD;QACE,sDAAsD;IACxD,CAAC;IAEM,MAAM,KAAK,QAAQ;QACxB,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EAAE,CAAC;YACtC,uBAAuB,CAAC,QAAQ,GAAG,IAAI,uBAAuB,EAAE,CAAC;QACnE,CAAC;QACD,OAAO,uBAAuB,CAAC,QAAQ,CAAC;IAC1C,CAAC;IACD,YAAY;IAEZ,GAAG,CAAC,OAAwB;QAC1B,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;YACxD,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,IAAI,GAAG;QACL,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAC1D,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,KAAK,QAAQ,CAChC,CAAC;IACJ,CAAC;IAED,KAAK,CACH,OAA0C;QAE1C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAQ,CAAC;QACvD,CAAC;QACD,OAAO,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAQ,CAAC;IACnE,CAAC;CACF;AAvCD,0DAuCC;AAED,oEAAoE;AACpE,UAAU,CAAC,+BAA+B,CAAC,GAAG,uBAAuB,CAAC,QAAQ,CAAC"}
@@ -0,0 +1,197 @@
1
+ import type { Server } from 'http';
2
+ import { URL } from 'url';
3
+ import type { Application } from 'express';
4
+ import type * as expressType from 'express';
5
+ import type { Repository } from 'taon-typeorm/lib-prod';
6
+ import { DataSource } from 'taon-typeorm/lib-prod';
7
+ import { CoreModels__NS__HttpMethod } from 'tnp-core/lib-prod';
8
+ import type { TaonBaseInjector } from './base-classes/base-injector';
9
+ import { ContextDbMigrations } from './context-db-migrations';
10
+ import type { ContextsEndpointStorage } from './endpoint-context-storage';
11
+ import { Models__NS__ClassType, Models__NS__ContextOptions, Models__NS__DatabaseConfigTypeOrm, Models__NS__FrameworkMode, Models__NS__ISession, Models__NS__MiddlewareType, Models__NS__TaonCtxCloneParams } from './models';
12
+ export declare class EndpointContext {
13
+ private originalConfig;
14
+ private configFn;
15
+ /**
16
+ * (@default: false)
17
+ * If TRUE context is NOT going to create db/express server/http endpoints
18
+ * PURPOSE OF THIS PROPERTY
19
+ * -> ONLY remote access from backend or frontend to specific backend
20
+ */
21
+ private readonly cloneOptions;
22
+ /**
23
+ * JUST FOR TESTING PURPOSES
24
+ */
25
+ readonly USE_MARIADB_MYSQL_IN_DOCKER: boolean;
26
+ disabledRealtime: boolean;
27
+ /**
28
+ * check whether context is inited
29
+ * (with init() function )
30
+ */
31
+ inited: boolean;
32
+ readonly dbMigrations: ContextDbMigrations;
33
+ private readonly localInstaceObjSymbol;
34
+ /**
35
+ * all instances of classes from context
36
+ * key is class name
37
+ */
38
+ readonly allClassesInstances: {};
39
+ private readonly classInstancesByNameObj;
40
+ private readonly objWithClassesInstancesArr;
41
+ readonly activeRoutes: {
42
+ expressPath: string;
43
+ method: CoreModels__NS__HttpMethod;
44
+ }[];
45
+ repos: Map<string, Repository<any>>;
46
+ get sourceContext(): EndpointContext | undefined;
47
+ readonly skipWritingServerRoutes: boolean;
48
+ private injectableTypesfromContexts;
49
+ private allTypesfromContexts;
50
+ expressApp: Application;
51
+ serverTcpUdp: Server;
52
+ databaseConfig?: Models__NS__DatabaseConfigTypeOrm;
53
+ mode: Models__NS__FrameworkMode;
54
+ readonly onlyMigrationRun?: boolean;
55
+ readonly onlyMigrationRevertToTimestamp?: number;
56
+ get isRunOrRevertOnlyMigrationAppStart(): boolean;
57
+ session?: Models__NS__ISession;
58
+ connection: DataSource;
59
+ private entitiesTriggers;
60
+ private realtime;
61
+ get realtimeClient(): import(".").RealtimeClient;
62
+ get realtimeServer(): import(".").RealtimeServer;
63
+ /**
64
+ * available after init()
65
+ */
66
+ config: Models__NS__ContextOptions<any, any, any, any, any, any, any, any>;
67
+ get logHttp(): boolean;
68
+ get logRealtime(): boolean;
69
+ get logFramework(): boolean;
70
+ get logRoutes(): boolean;
71
+ get logDb(): boolean;
72
+ get logMigrations(): boolean;
73
+ /**
74
+ * Inside docker there is not need for https secure server
75
+ */
76
+ readonly isRunningInsideDocker: boolean;
77
+ constructor(originalConfig: Models__NS__ContextOptions<any, any, any, any, any, any, any, any>, configFn: (env: any) => Models__NS__ContextOptions<any, any, any, any, any, any, any, any>,
78
+ /**
79
+ * (@default: false)
80
+ * If TRUE context is NOT going to create db/express server/http endpoints
81
+ * PURPOSE OF THIS PROPERTY
82
+ * -> ONLY remote access from backend or frontend to specific backend
83
+ */
84
+ cloneOptions: Models__NS__TaonCtxCloneParams);
85
+ init(options?: {
86
+ initFromRecrusiveContextResovle?: boolean;
87
+ onlyMigrationRun?: boolean;
88
+ onlyMigrationRevertToTimestamp?: number;
89
+ }): Promise<void>;
90
+ private getAutoGeneratedConfig;
91
+ startServer(): Promise<void>;
92
+ displayRoutes(app: any): void;
93
+ get modeAllowsDatabaseCreation(): boolean;
94
+ private cloneClassWithNewMetadata;
95
+ private cloneClassesObjWithNewMetadata;
96
+ private getRecrusiveClassesfromContextsObj;
97
+ private getRecrusiveClassesfromContexts;
98
+ getClassInstanceObjBy(classType: Models__NS__ClassType): any;
99
+ private getClassesInstancesArrBy;
100
+ inject<T>(ctor: new (...args: any[]) => T, options: {
101
+ localInstance?: boolean;
102
+ contextClassInstance?: TaonBaseInjector;
103
+ locaInstanceConstructorArgs?: ConstructorParameters<typeof ctor>;
104
+ parentInstanceThatWillGetInjectedStuff: object;
105
+ }): T;
106
+ /**
107
+ * alias for inject
108
+ */
109
+ getInstanceBy<T>(ctor: new (...args: any[]) => T): T;
110
+ checkIfContextInitialized(): void;
111
+ getClassFunBy(classType: Models__NS__ClassType): any;
112
+ isCLassType(classType: Models__NS__ClassType, classFn: Function): boolean;
113
+ /**
114
+ * Only for injectable types
115
+ * Only for classType: CONTROLLER, REPOSITORY, PROVIDER, MIDDLEWARES
116
+ */
117
+ getClassFunByClassName(className: string): Function;
118
+ getClassFunByClass(classFunction: Function): Function;
119
+ getClassFunByArr(classType: Models__NS__ClassType): Function[];
120
+ private createInstances;
121
+ initClasses(): Promise<void>;
122
+ isActiveOn(classInstance: object): boolean;
123
+ get frontendHostUri(): URL;
124
+ get uri(): URL | undefined;
125
+ get uriProtocol(): string | undefined;
126
+ /**
127
+ * Examples
128
+ * http://localhost:3000
129
+ * https://localhost (from localhost:80) *
130
+ */
131
+ get uriOrigin(): string | undefined;
132
+ /**
133
+ * Exampels
134
+ * http://localhost:3000/path/to/somewhere
135
+ * https://localhost/path/to/somewhere (from localhost:80)
136
+ */
137
+ get uriPathname(): string | undefined;
138
+ /**
139
+ * Examples
140
+ * http://localhost:3000/path/to/somewhere -> '/path/to/somewhere'
141
+ * http://localhost:3000 -> '' #
142
+ * https://localhost/path/to/ -> '/path/to/somewhere' # remove last slash
143
+ */
144
+ get uriPathnameOrNothingIfRoot(): string;
145
+ get uriPort(): string | undefined;
146
+ /**
147
+ * Port from uri as number
148
+ * @returns {Number | undefined}
149
+ */
150
+ get port(): Number | undefined;
151
+ get isHttpServer(): boolean;
152
+ /**
153
+ * Check if context is for remote only
154
+ */
155
+ get isRemoteHost(): boolean;
156
+ /**
157
+ * ipc/udp needs this
158
+ */
159
+ get contextName(): string;
160
+ /**
161
+ * ipc/udp needs this
162
+ */
163
+ get contextNameForCommunication(): string;
164
+ /**
165
+ * Check context type
166
+ */
167
+ get contextType(): 'normal' | 'remote' | 'abstract' | 'invalid';
168
+ get cwd(): string;
169
+ get activeContext(): string | null;
170
+ get appId(): string;
171
+ get publicAssets(): {
172
+ serverPath: string;
173
+ locationOnDisk: string;
174
+ }[];
175
+ get isProductionMode(): boolean;
176
+ get host(): string | undefined;
177
+ get origin(): string | undefined;
178
+ initSubscribers(): Promise<void>;
179
+ initEntities(): Promise<void>;
180
+ destroy(): Promise<void>;
181
+ initDatabaseConnection(): Promise<void>;
182
+ private updateCalculatedPathsForControllers;
183
+ private mergeControllerMethodsConfigs;
184
+ initControllersHook(ctxStorage: ContextsEndpointStorage): Promise<void>;
185
+ initControllers(): Promise<void>;
186
+ writeActiveRoutes(): void;
187
+ get middlewares(): Models__NS__MiddlewareType[];
188
+ private initCustomClientMiddlewares;
189
+ private initCustomBackendMiddlewares;
190
+ private initBackendMiddlewares;
191
+ private initServer;
192
+ protected sendError(res: expressType.Response, error: unknown, req: expressType.Request, expressPath: string): void;
193
+ /**
194
+ * client can be browser or nodejs (when remote host)
195
+ */
196
+ private initClient;
197
+ }