@zyno-io/ts-server-foundation 26.712.36

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 (771) hide show
  1. package/README.md +31 -0
  2. package/dist/devconsole/assets/index-BlWLbczn.css +1 -0
  3. package/dist/devconsole/assets/index-lSF6DUY3.js +3 -0
  4. package/dist/devconsole/index.html +13 -0
  5. package/dist/src/app/base.d.ts +66 -0
  6. package/dist/src/app/base.d.ts.map +1 -0
  7. package/dist/src/app/base.js +577 -0
  8. package/dist/src/app/base.js.map +1 -0
  9. package/dist/src/app/commands.d.ts +20 -0
  10. package/dist/src/app/commands.d.ts.map +1 -0
  11. package/dist/src/app/commands.js +17 -0
  12. package/dist/src/app/commands.js.map +1 -0
  13. package/dist/src/app/config-loader.d.ts +9 -0
  14. package/dist/src/app/config-loader.d.ts.map +1 -0
  15. package/dist/src/app/config-loader.js +91 -0
  16. package/dist/src/app/config-loader.js.map +1 -0
  17. package/dist/src/app/config.d.ts +96 -0
  18. package/dist/src/app/config.d.ts.map +1 -0
  19. package/dist/src/app/config.js +114 -0
  20. package/dist/src/app/config.js.map +1 -0
  21. package/dist/src/app/const.d.ts +5 -0
  22. package/dist/src/app/const.d.ts.map +1 -0
  23. package/dist/src/app/const.js +17 -0
  24. package/dist/src/app/const.js.map +1 -0
  25. package/dist/src/app/current.d.ts +5 -0
  26. package/dist/src/app/current.d.ts.map +1 -0
  27. package/dist/src/app/current.js +14 -0
  28. package/dist/src/app/current.js.map +1 -0
  29. package/dist/src/app/index.d.ts +8 -0
  30. package/dist/src/app/index.d.ts.map +1 -0
  31. package/dist/src/app/index.js +13 -0
  32. package/dist/src/app/index.js.map +1 -0
  33. package/dist/src/app/lifecycle.d.ts +9 -0
  34. package/dist/src/app/lifecycle.d.ts.map +1 -0
  35. package/dist/src/app/lifecycle.js +21 -0
  36. package/dist/src/app/lifecycle.js.map +1 -0
  37. package/dist/src/app/migrations-entrypoint.d.ts +3 -0
  38. package/dist/src/app/migrations-entrypoint.d.ts.map +1 -0
  39. package/dist/src/app/migrations-entrypoint.js +35 -0
  40. package/dist/src/app/migrations-entrypoint.js.map +1 -0
  41. package/dist/src/app/resolver.d.ts +6 -0
  42. package/dist/src/app/resolver.d.ts.map +1 -0
  43. package/dist/src/app/resolver.js +15 -0
  44. package/dist/src/app/resolver.js.map +1 -0
  45. package/dist/src/auth/index.d.ts +3 -0
  46. package/dist/src/auth/index.d.ts.map +1 -0
  47. package/dist/src/auth/index.js +15 -0
  48. package/dist/src/auth/index.js.map +1 -0
  49. package/dist/src/auth/jwt.d.ts +61 -0
  50. package/dist/src/auth/jwt.d.ts.map +1 -0
  51. package/dist/src/auth/jwt.js +379 -0
  52. package/dist/src/auth/jwt.js.map +1 -0
  53. package/dist/src/auth/provider.d.ts +21 -0
  54. package/dist/src/auth/provider.d.ts.map +1 -0
  55. package/dist/src/auth/provider.js +148 -0
  56. package/dist/src/auth/provider.js.map +1 -0
  57. package/dist/src/cli/common.d.ts +13 -0
  58. package/dist/src/cli/common.d.ts.map +1 -0
  59. package/dist/src/cli/common.js +99 -0
  60. package/dist/src/cli/common.js.map +1 -0
  61. package/dist/src/cli/tsf-create-app.d.ts +3 -0
  62. package/dist/src/cli/tsf-create-app.d.ts.map +1 -0
  63. package/dist/src/cli/tsf-create-app.js +89 -0
  64. package/dist/src/cli/tsf-create-app.js.map +1 -0
  65. package/dist/src/cli/tsf-dev.d.ts +3 -0
  66. package/dist/src/cli/tsf-dev.d.ts.map +1 -0
  67. package/dist/src/cli/tsf-dev.js +753 -0
  68. package/dist/src/cli/tsf-dev.js.map +1 -0
  69. package/dist/src/cli/tsf-gen-proto.d.ts +3 -0
  70. package/dist/src/cli/tsf-gen-proto.d.ts.map +1 -0
  71. package/dist/src/cli/tsf-gen-proto.js +134 -0
  72. package/dist/src/cli/tsf-gen-proto.js.map +1 -0
  73. package/dist/src/cli/tsf-install.d.ts +8 -0
  74. package/dist/src/cli/tsf-install.d.ts.map +1 -0
  75. package/dist/src/cli/tsf-install.js +424 -0
  76. package/dist/src/cli/tsf-install.js.map +1 -0
  77. package/dist/src/cli/tsf-migrate.d.ts +3 -0
  78. package/dist/src/cli/tsf-migrate.d.ts.map +1 -0
  79. package/dist/src/cli/tsf-migrate.js +271 -0
  80. package/dist/src/cli/tsf-migrate.js.map +1 -0
  81. package/dist/src/cli/tsf-test.d.ts +4 -0
  82. package/dist/src/cli/tsf-test.d.ts.map +1 -0
  83. package/dist/src/cli/tsf-test.js +350 -0
  84. package/dist/src/cli/tsf-test.js.map +1 -0
  85. package/dist/src/cli/tsf-update.d.ts +3 -0
  86. package/dist/src/cli/tsf-update.d.ts.map +1 -0
  87. package/dist/src/cli/tsf-update.js +12 -0
  88. package/dist/src/cli/tsf-update.js.map +1 -0
  89. package/dist/src/cli/tsf.d.ts +3 -0
  90. package/dist/src/cli/tsf.d.ts.map +1 -0
  91. package/dist/src/cli/tsf.js +29 -0
  92. package/dist/src/cli/tsf.js.map +1 -0
  93. package/dist/src/database/database.d.ts +54 -0
  94. package/dist/src/database/database.d.ts.map +1 -0
  95. package/dist/src/database/database.js +695 -0
  96. package/dist/src/database/database.js.map +1 -0
  97. package/dist/src/database/driver.d.ts +28 -0
  98. package/dist/src/database/driver.d.ts.map +1 -0
  99. package/dist/src/database/driver.js +5 -0
  100. package/dist/src/database/driver.js.map +1 -0
  101. package/dist/src/database/drivers/index.d.ts +4 -0
  102. package/dist/src/database/drivers/index.d.ts.map +1 -0
  103. package/dist/src/database/drivers/index.js +9 -0
  104. package/dist/src/database/drivers/index.js.map +1 -0
  105. package/dist/src/database/drivers/mysql-session-rpc.d.ts +40 -0
  106. package/dist/src/database/drivers/mysql-session-rpc.d.ts.map +1 -0
  107. package/dist/src/database/drivers/mysql-session-rpc.js +180 -0
  108. package/dist/src/database/drivers/mysql-session-rpc.js.map +1 -0
  109. package/dist/src/database/drivers/mysql-session.d.ts +25 -0
  110. package/dist/src/database/drivers/mysql-session.d.ts.map +1 -0
  111. package/dist/src/database/drivers/mysql-session.js +124 -0
  112. package/dist/src/database/drivers/mysql-session.js.map +1 -0
  113. package/dist/src/database/drivers/mysql.d.ts +20 -0
  114. package/dist/src/database/drivers/mysql.d.ts.map +1 -0
  115. package/dist/src/database/drivers/mysql.js +84 -0
  116. package/dist/src/database/drivers/mysql.js.map +1 -0
  117. package/dist/src/database/drivers/postgres.d.ts +22 -0
  118. package/dist/src/database/drivers/postgres.d.ts.map +1 -0
  119. package/dist/src/database/drivers/postgres.js +80 -0
  120. package/dist/src/database/drivers/postgres.js.map +1 -0
  121. package/dist/src/database/entity.d.ts +112 -0
  122. package/dist/src/database/entity.d.ts.map +1 -0
  123. package/dist/src/database/entity.js +333 -0
  124. package/dist/src/database/entity.js.map +1 -0
  125. package/dist/src/database/errors.d.ts +7 -0
  126. package/dist/src/database/errors.d.ts.map +1 -0
  127. package/dist/src/database/errors.js +34 -0
  128. package/dist/src/database/errors.js.map +1 -0
  129. package/dist/src/database/factory.d.ts +48 -0
  130. package/dist/src/database/factory.d.ts.map +1 -0
  131. package/dist/src/database/factory.js +139 -0
  132. package/dist/src/database/factory.js.map +1 -0
  133. package/dist/src/database/identifiers.d.ts +8 -0
  134. package/dist/src/database/identifiers.d.ts.map +1 -0
  135. package/dist/src/database/identifiers.js +46 -0
  136. package/dist/src/database/identifiers.js.map +1 -0
  137. package/dist/src/database/index.d.ts +14 -0
  138. package/dist/src/database/index.d.ts.map +1 -0
  139. package/dist/src/database/index.js +33 -0
  140. package/dist/src/database/index.js.map +1 -0
  141. package/dist/src/database/metadata.d.ts +27 -0
  142. package/dist/src/database/metadata.d.ts.map +1 -0
  143. package/dist/src/database/metadata.js +70 -0
  144. package/dist/src/database/metadata.js.map +1 -0
  145. package/dist/src/database/migration/create/comparator.d.ts +3 -0
  146. package/dist/src/database/migration/create/comparator.d.ts.map +1 -0
  147. package/dist/src/database/migration/create/comparator.js +302 -0
  148. package/dist/src/database/migration/create/comparator.js.map +1 -0
  149. package/dist/src/database/migration/create/db-reader.d.ts +9 -0
  150. package/dist/src/database/migration/create/db-reader.d.ts.map +1 -0
  151. package/dist/src/database/migration/create/db-reader.js +478 -0
  152. package/dist/src/database/migration/create/db-reader.js.map +1 -0
  153. package/dist/src/database/migration/create/ddl-generator.d.ts +4 -0
  154. package/dist/src/database/migration/create/ddl-generator.d.ts.map +1 -0
  155. package/dist/src/database/migration/create/ddl-generator.js +431 -0
  156. package/dist/src/database/migration/create/ddl-generator.js.map +1 -0
  157. package/dist/src/database/migration/create/entity-reader.d.ts +7 -0
  158. package/dist/src/database/migration/create/entity-reader.d.ts.map +1 -0
  159. package/dist/src/database/migration/create/entity-reader.js +169 -0
  160. package/dist/src/database/migration/create/entity-reader.js.map +1 -0
  161. package/dist/src/database/migration/create/file-generator.d.ts +7 -0
  162. package/dist/src/database/migration/create/file-generator.d.ts.map +1 -0
  163. package/dist/src/database/migration/create/file-generator.js +60 -0
  164. package/dist/src/database/migration/create/file-generator.js.map +1 -0
  165. package/dist/src/database/migration/create/index.d.ts +19 -0
  166. package/dist/src/database/migration/create/index.d.ts.map +1 -0
  167. package/dist/src/database/migration/create/index.js +102 -0
  168. package/dist/src/database/migration/create/index.js.map +1 -0
  169. package/dist/src/database/migration/create/schema-model.d.ts +99 -0
  170. package/dist/src/database/migration/create/schema-model.d.ts.map +1 -0
  171. package/dist/src/database/migration/create/schema-model.js +24 -0
  172. package/dist/src/database/migration/create/schema-model.js.map +1 -0
  173. package/dist/src/database/migration/create/type-mapper.d.ts +13 -0
  174. package/dist/src/database/migration/create/type-mapper.d.ts.map +1 -0
  175. package/dist/src/database/migration/create/type-mapper.js +293 -0
  176. package/dist/src/database/migration/create/type-mapper.js.map +1 -0
  177. package/dist/src/database/migration/index.d.ts +33 -0
  178. package/dist/src/database/migration/index.d.ts.map +1 -0
  179. package/dist/src/database/migration/index.js +165 -0
  180. package/dist/src/database/migration/index.js.map +1 -0
  181. package/dist/src/database/migration/maintenance.d.ts +26 -0
  182. package/dist/src/database/migration/maintenance.d.ts.map +1 -0
  183. package/dist/src/database/migration/maintenance.js +65 -0
  184. package/dist/src/database/migration/maintenance.js.map +1 -0
  185. package/dist/src/database/query.d.ts +79 -0
  186. package/dist/src/database/query.d.ts.map +1 -0
  187. package/dist/src/database/query.js +435 -0
  188. package/dist/src/database/query.js.map +1 -0
  189. package/dist/src/database/schema.d.ts +147 -0
  190. package/dist/src/database/schema.d.ts.map +1 -0
  191. package/dist/src/database/schema.js +709 -0
  192. package/dist/src/database/schema.js.map +1 -0
  193. package/dist/src/database/session.d.ts +63 -0
  194. package/dist/src/database/session.d.ts.map +1 -0
  195. package/dist/src/database/session.js +226 -0
  196. package/dist/src/database/session.js.map +1 -0
  197. package/dist/src/database/sql.d.ts +37 -0
  198. package/dist/src/database/sql.d.ts.map +1 -0
  199. package/dist/src/database/sql.js +143 -0
  200. package/dist/src/database/sql.js.map +1 -0
  201. package/dist/src/database/values.d.ts +6 -0
  202. package/dist/src/database/values.d.ts.map +1 -0
  203. package/dist/src/database/values.js +237 -0
  204. package/dist/src/database/values.js.map +1 -0
  205. package/dist/src/devconsole/controller.d.ts +11 -0
  206. package/dist/src/devconsole/controller.d.ts.map +1 -0
  207. package/dist/src/devconsole/controller.js +78 -0
  208. package/dist/src/devconsole/controller.js.map +1 -0
  209. package/dist/src/devconsole/generated/devconsole.d.ts +306 -0
  210. package/dist/src/devconsole/generated/devconsole.d.ts.map +1 -0
  211. package/dist/src/devconsole/generated/devconsole.js +4029 -0
  212. package/dist/src/devconsole/generated/devconsole.js.map +1 -0
  213. package/dist/src/devconsole/index.d.ts +10 -0
  214. package/dist/src/devconsole/index.d.ts.map +1 -0
  215. package/dist/src/devconsole/index.js +26 -0
  216. package/dist/src/devconsole/index.js.map +1 -0
  217. package/dist/src/devconsole/observers.d.ts +4 -0
  218. package/dist/src/devconsole/observers.d.ts.map +1 -0
  219. package/dist/src/devconsole/observers.js +170 -0
  220. package/dist/src/devconsole/observers.js.map +1 -0
  221. package/dist/src/devconsole/runtime.d.ts +16 -0
  222. package/dist/src/devconsole/runtime.d.ts.map +1 -0
  223. package/dist/src/devconsole/runtime.js +48 -0
  224. package/dist/src/devconsole/runtime.js.map +1 -0
  225. package/dist/src/devconsole/security.d.ts +8 -0
  226. package/dist/src/devconsole/security.d.ts.map +1 -0
  227. package/dist/src/devconsole/security.js +33 -0
  228. package/dist/src/devconsole/security.js.map +1 -0
  229. package/dist/src/devconsole/server.d.ts +25 -0
  230. package/dist/src/devconsole/server.d.ts.map +1 -0
  231. package/dist/src/devconsole/server.js +452 -0
  232. package/dist/src/devconsole/server.js.map +1 -0
  233. package/dist/src/devconsole/store.d.ts +111 -0
  234. package/dist/src/devconsole/store.d.ts.map +1 -0
  235. package/dist/src/devconsole/store.js +177 -0
  236. package/dist/src/devconsole/store.js.map +1 -0
  237. package/dist/src/di/container.d.ts +38 -0
  238. package/dist/src/di/container.d.ts.map +1 -0
  239. package/dist/src/di/container.js +252 -0
  240. package/dist/src/di/container.js.map +1 -0
  241. package/dist/src/di/errors.d.ts +18 -0
  242. package/dist/src/di/errors.d.ts.map +1 -0
  243. package/dist/src/di/errors.js +71 -0
  244. package/dist/src/di/errors.js.map +1 -0
  245. package/dist/src/di/index.d.ts +5 -0
  246. package/dist/src/di/index.d.ts.map +1 -0
  247. package/dist/src/di/index.js +10 -0
  248. package/dist/src/di/index.js.map +1 -0
  249. package/dist/src/di/module.d.ts +29 -0
  250. package/dist/src/di/module.d.ts.map +1 -0
  251. package/dist/src/di/module.js +42 -0
  252. package/dist/src/di/module.js.map +1 -0
  253. package/dist/src/di/provider.d.ts +34 -0
  254. package/dist/src/di/provider.d.ts.map +1 -0
  255. package/dist/src/di/provider.js +24 -0
  256. package/dist/src/di/provider.js.map +1 -0
  257. package/dist/src/env.d.ts +122 -0
  258. package/dist/src/env.d.ts.map +1 -0
  259. package/dist/src/env.js +61 -0
  260. package/dist/src/env.js.map +1 -0
  261. package/dist/src/events/event-bus.d.ts +26 -0
  262. package/dist/src/events/event-bus.d.ts.map +1 -0
  263. package/dist/src/events/event-bus.js +67 -0
  264. package/dist/src/events/event-bus.js.map +1 -0
  265. package/dist/src/events/index.d.ts +2 -0
  266. package/dist/src/events/index.d.ts.map +1 -0
  267. package/dist/src/events/index.js +7 -0
  268. package/dist/src/events/index.js.map +1 -0
  269. package/dist/src/health/healthcheck.controller.d.ts +9 -0
  270. package/dist/src/health/healthcheck.controller.d.ts.map +1 -0
  271. package/dist/src/health/healthcheck.controller.js +33 -0
  272. package/dist/src/health/healthcheck.controller.js.map +1 -0
  273. package/dist/src/health/healthcheck.service.d.ts +13 -0
  274. package/dist/src/health/healthcheck.service.d.ts.map +1 -0
  275. package/dist/src/health/healthcheck.service.js +37 -0
  276. package/dist/src/health/healthcheck.service.js.map +1 -0
  277. package/dist/src/health/index.d.ts +3 -0
  278. package/dist/src/health/index.d.ts.map +1 -0
  279. package/dist/src/health/index.js +8 -0
  280. package/dist/src/health/index.js.map +1 -0
  281. package/dist/src/helpers/async/context.d.ts +10 -0
  282. package/dist/src/helpers/async/context.d.ts.map +1 -0
  283. package/dist/src/helpers/async/context.js +52 -0
  284. package/dist/src/helpers/async/context.js.map +1 -0
  285. package/dist/src/helpers/async/process.d.ts +16 -0
  286. package/dist/src/helpers/async/process.d.ts.map +1 -0
  287. package/dist/src/helpers/async/process.js +62 -0
  288. package/dist/src/helpers/async/process.js.map +1 -0
  289. package/dist/src/helpers/async/promise.d.ts +11 -0
  290. package/dist/src/helpers/async/promise.d.ts.map +1 -0
  291. package/dist/src/helpers/async/promise.js +32 -0
  292. package/dist/src/helpers/async/promise.js.map +1 -0
  293. package/dist/src/helpers/data/array.d.ts +5 -0
  294. package/dist/src/helpers/data/array.d.ts.map +1 -0
  295. package/dist/src/helpers/data/array.js +27 -0
  296. package/dist/src/helpers/data/array.js.map +1 -0
  297. package/dist/src/helpers/data/objects.d.ts +13 -0
  298. package/dist/src/helpers/data/objects.d.ts.map +1 -0
  299. package/dist/src/helpers/data/objects.js +55 -0
  300. package/dist/src/helpers/data/objects.js.map +1 -0
  301. package/dist/src/helpers/data/serialization.d.ts +5 -0
  302. package/dist/src/helpers/data/serialization.d.ts.map +1 -0
  303. package/dist/src/helpers/data/serialization.js +25 -0
  304. package/dist/src/helpers/data/serialization.js.map +1 -0
  305. package/dist/src/helpers/data/transformer.d.ts +13 -0
  306. package/dist/src/helpers/data/transformer.d.ts.map +1 -0
  307. package/dist/src/helpers/data/transformer.js +50 -0
  308. package/dist/src/helpers/data/transformer.js.map +1 -0
  309. package/dist/src/helpers/index.d.ts +19 -0
  310. package/dist/src/helpers/index.d.ts.map +1 -0
  311. package/dist/src/helpers/index.js +30 -0
  312. package/dist/src/helpers/index.js.map +1 -0
  313. package/dist/src/helpers/io/package.d.ts +10 -0
  314. package/dist/src/helpers/io/package.d.ts.map +1 -0
  315. package/dist/src/helpers/io/package.js +35 -0
  316. package/dist/src/helpers/io/package.js.map +1 -0
  317. package/dist/src/helpers/io/stream.d.ts +18 -0
  318. package/dist/src/helpers/io/stream.d.ts.map +1 -0
  319. package/dist/src/helpers/io/stream.js +131 -0
  320. package/dist/src/helpers/io/stream.js.map +1 -0
  321. package/dist/src/helpers/redis/broadcast.d.ts +15 -0
  322. package/dist/src/helpers/redis/broadcast.d.ts.map +1 -0
  323. package/dist/src/helpers/redis/broadcast.js +93 -0
  324. package/dist/src/helpers/redis/broadcast.js.map +1 -0
  325. package/dist/src/helpers/redis/cache.d.ts +20 -0
  326. package/dist/src/helpers/redis/cache.d.ts.map +1 -0
  327. package/dist/src/helpers/redis/cache.js +57 -0
  328. package/dist/src/helpers/redis/cache.js.map +1 -0
  329. package/dist/src/helpers/redis/mutex.d.ts +45 -0
  330. package/dist/src/helpers/redis/mutex.d.ts.map +1 -0
  331. package/dist/src/helpers/redis/mutex.js +446 -0
  332. package/dist/src/helpers/redis/mutex.js.map +1 -0
  333. package/dist/src/helpers/redis/redis.d.ts +12 -0
  334. package/dist/src/helpers/redis/redis.d.ts.map +1 -0
  335. package/dist/src/helpers/redis/redis.js +62 -0
  336. package/dist/src/helpers/redis/redis.js.map +1 -0
  337. package/dist/src/helpers/security/crypto.d.ts +31 -0
  338. package/dist/src/helpers/security/crypto.d.ts.map +1 -0
  339. package/dist/src/helpers/security/crypto.js +108 -0
  340. package/dist/src/helpers/security/crypto.js.map +1 -0
  341. package/dist/src/helpers/security/validation.d.ts +3 -0
  342. package/dist/src/helpers/security/validation.d.ts.map +1 -0
  343. package/dist/src/helpers/security/validation.js +14 -0
  344. package/dist/src/helpers/security/validation.js.map +1 -0
  345. package/dist/src/helpers/utils/date.d.ts +4 -0
  346. package/dist/src/helpers/utils/date.d.ts.map +1 -0
  347. package/dist/src/helpers/utils/date.js +16 -0
  348. package/dist/src/helpers/utils/date.js.map +1 -0
  349. package/dist/src/helpers/utils/error.d.ts +20 -0
  350. package/dist/src/helpers/utils/error.d.ts.map +1 -0
  351. package/dist/src/helpers/utils/error.js +164 -0
  352. package/dist/src/helpers/utils/error.js.map +1 -0
  353. package/dist/src/helpers/utils/uuid.d.ts +5 -0
  354. package/dist/src/helpers/utils/uuid.d.ts.map +1 -0
  355. package/dist/src/helpers/utils/uuid.js +13 -0
  356. package/dist/src/helpers/utils/uuid.js.map +1 -0
  357. package/dist/src/http/auth.d.ts +20 -0
  358. package/dist/src/http/auth.d.ts.map +1 -0
  359. package/dist/src/http/auth.js +68 -0
  360. package/dist/src/http/auth.js.map +1 -0
  361. package/dist/src/http/base.d.ts +57 -0
  362. package/dist/src/http/base.d.ts.map +1 -0
  363. package/dist/src/http/base.js +331 -0
  364. package/dist/src/http/base.js.map +1 -0
  365. package/dist/src/http/context.d.ts +6 -0
  366. package/dist/src/http/context.d.ts.map +1 -0
  367. package/dist/src/http/context.js +26 -0
  368. package/dist/src/http/context.js.map +1 -0
  369. package/dist/src/http/cors.d.ts +25 -0
  370. package/dist/src/http/cors.d.ts.map +1 -0
  371. package/dist/src/http/cors.js +124 -0
  372. package/dist/src/http/cors.js.map +1 -0
  373. package/dist/src/http/decorators.d.ts +64 -0
  374. package/dist/src/http/decorators.d.ts.map +1 -0
  375. package/dist/src/http/decorators.js +102 -0
  376. package/dist/src/http/decorators.js.map +1 -0
  377. package/dist/src/http/errors.d.ts +50 -0
  378. package/dist/src/http/errors.d.ts.map +1 -0
  379. package/dist/src/http/errors.js +158 -0
  380. package/dist/src/http/errors.js.map +1 -0
  381. package/dist/src/http/index.d.ts +31 -0
  382. package/dist/src/http/index.d.ts.map +1 -0
  383. package/dist/src/http/index.js +33 -0
  384. package/dist/src/http/index.js.map +1 -0
  385. package/dist/src/http/middleware.d.ts +12 -0
  386. package/dist/src/http/middleware.d.ts.map +1 -0
  387. package/dist/src/http/middleware.js +31 -0
  388. package/dist/src/http/middleware.js.map +1 -0
  389. package/dist/src/http/parameter-resolvers.d.ts +3 -0
  390. package/dist/src/http/parameter-resolvers.d.ts.map +1 -0
  391. package/dist/src/http/parameter-resolvers.js +8 -0
  392. package/dist/src/http/parameter-resolvers.js.map +1 -0
  393. package/dist/src/http/request-logging.d.ts +34 -0
  394. package/dist/src/http/request-logging.d.ts.map +1 -0
  395. package/dist/src/http/request-logging.js +130 -0
  396. package/dist/src/http/request-logging.js.map +1 -0
  397. package/dist/src/http/request.d.ts +69 -0
  398. package/dist/src/http/request.d.ts.map +1 -0
  399. package/dist/src/http/request.js +366 -0
  400. package/dist/src/http/request.js.map +1 -0
  401. package/dist/src/http/response.d.ts +98 -0
  402. package/dist/src/http/response.d.ts.map +1 -0
  403. package/dist/src/http/response.js +292 -0
  404. package/dist/src/http/response.js.map +1 -0
  405. package/dist/src/http/router.d.ts +100 -0
  406. package/dist/src/http/router.d.ts.map +1 -0
  407. package/dist/src/http/router.js +1085 -0
  408. package/dist/src/http/router.js.map +1 -0
  409. package/dist/src/http/startup-logging.d.ts +8 -0
  410. package/dist/src/http/startup-logging.d.ts.map +1 -0
  411. package/dist/src/http/startup-logging.js +55 -0
  412. package/dist/src/http/startup-logging.js.map +1 -0
  413. package/dist/src/http/static-files.d.ts +15 -0
  414. package/dist/src/http/static-files.d.ts.map +1 -0
  415. package/dist/src/http/static-files.js +110 -0
  416. package/dist/src/http/static-files.js.map +1 -0
  417. package/dist/src/http/store.d.ts +8 -0
  418. package/dist/src/http/store.d.ts.map +1 -0
  419. package/dist/src/http/store.js +47 -0
  420. package/dist/src/http/store.js.map +1 -0
  421. package/dist/src/http/types.d.ts +23 -0
  422. package/dist/src/http/types.d.ts.map +1 -0
  423. package/dist/src/http/types.js +3 -0
  424. package/dist/src/http/types.js.map +1 -0
  425. package/dist/src/http/upgrade.d.ts +22 -0
  426. package/dist/src/http/upgrade.d.ts.map +1 -0
  427. package/dist/src/http/upgrade.js +164 -0
  428. package/dist/src/http/upgrade.js.map +1 -0
  429. package/dist/src/http/uploads.d.ts +36 -0
  430. package/dist/src/http/uploads.d.ts.map +1 -0
  431. package/dist/src/http/uploads.js +287 -0
  432. package/dist/src/http/uploads.js.map +1 -0
  433. package/dist/src/http/workflow.d.ts +34 -0
  434. package/dist/src/http/workflow.d.ts.map +1 -0
  435. package/dist/src/http/workflow.js +40 -0
  436. package/dist/src/http/workflow.js.map +1 -0
  437. package/dist/src/index.d.ts +21 -0
  438. package/dist/src/index.d.ts.map +1 -0
  439. package/dist/src/index.js +88 -0
  440. package/dist/src/index.js.map +1 -0
  441. package/dist/src/openapi/controller.d.ts +9 -0
  442. package/dist/src/openapi/controller.d.ts.map +1 -0
  443. package/dist/src/openapi/controller.js +45 -0
  444. package/dist/src/openapi/controller.js.map +1 -0
  445. package/dist/src/openapi/index.d.ts +5 -0
  446. package/dist/src/openapi/index.d.ts.map +1 -0
  447. package/dist/src/openapi/index.js +21 -0
  448. package/dist/src/openapi/index.js.map +1 -0
  449. package/dist/src/openapi/schema.d.ts +26 -0
  450. package/dist/src/openapi/schema.d.ts.map +1 -0
  451. package/dist/src/openapi/schema.js +1128 -0
  452. package/dist/src/openapi/schema.js.map +1 -0
  453. package/dist/src/openapi/serializer.d.ts +16 -0
  454. package/dist/src/openapi/serializer.d.ts.map +1 -0
  455. package/dist/src/openapi/serializer.js +506 -0
  456. package/dist/src/openapi/serializer.js.map +1 -0
  457. package/dist/src/openapi/types.d.ts +84 -0
  458. package/dist/src/openapi/types.d.ts.map +1 -0
  459. package/dist/src/openapi/types.js +5 -0
  460. package/dist/src/openapi/types.js.map +1 -0
  461. package/dist/src/reflection/annotations.d.ts +15 -0
  462. package/dist/src/reflection/annotations.d.ts.map +1 -0
  463. package/dist/src/reflection/annotations.js +228 -0
  464. package/dist/src/reflection/annotations.js.map +1 -0
  465. package/dist/src/reflection/conversion.d.ts +15 -0
  466. package/dist/src/reflection/conversion.d.ts.map +1 -0
  467. package/dist/src/reflection/conversion.js +360 -0
  468. package/dist/src/reflection/conversion.js.map +1 -0
  469. package/dist/src/reflection/deserializer.d.ts +15 -0
  470. package/dist/src/reflection/deserializer.d.ts.map +1 -0
  471. package/dist/src/reflection/deserializer.js +42 -0
  472. package/dist/src/reflection/deserializer.js.map +1 -0
  473. package/dist/src/reflection/entity.d.ts +9 -0
  474. package/dist/src/reflection/entity.d.ts.map +1 -0
  475. package/dist/src/reflection/entity.js +74 -0
  476. package/dist/src/reflection/entity.js.map +1 -0
  477. package/dist/src/reflection/errors.d.ts +8 -0
  478. package/dist/src/reflection/errors.d.ts.map +1 -0
  479. package/dist/src/reflection/errors.js +21 -0
  480. package/dist/src/reflection/errors.js.map +1 -0
  481. package/dist/src/reflection/index.d.ts +8 -0
  482. package/dist/src/reflection/index.d.ts.map +1 -0
  483. package/dist/src/reflection/index.js +13 -0
  484. package/dist/src/reflection/index.js.map +1 -0
  485. package/dist/src/reflection/metadata-store.d.ts +14 -0
  486. package/dist/src/reflection/metadata-store.d.ts.map +1 -0
  487. package/dist/src/reflection/metadata-store.js +18 -0
  488. package/dist/src/reflection/metadata-store.js.map +1 -0
  489. package/dist/src/reflection/model.d.ts +271 -0
  490. package/dist/src/reflection/model.d.ts.map +1 -0
  491. package/dist/src/reflection/model.js +36 -0
  492. package/dist/src/reflection/model.js.map +1 -0
  493. package/dist/src/reflection/reflection-class.d.ts +60 -0
  494. package/dist/src/reflection/reflection-class.d.ts.map +1 -0
  495. package/dist/src/reflection/reflection-class.js +263 -0
  496. package/dist/src/reflection/reflection-class.js.map +1 -0
  497. package/dist/src/reflection/type-utils.d.ts +34 -0
  498. package/dist/src/reflection/type-utils.d.ts.map +1 -0
  499. package/dist/src/reflection/type-utils.js +485 -0
  500. package/dist/src/reflection/type-utils.js.map +1 -0
  501. package/dist/src/reflection.d.ts +2 -0
  502. package/dist/src/reflection.d.ts.map +1 -0
  503. package/dist/src/reflection.js +5 -0
  504. package/dist/src/reflection.js.map +1 -0
  505. package/dist/src/services/cli.d.ts +9 -0
  506. package/dist/src/services/cli.d.ts.map +1 -0
  507. package/dist/src/services/cli.js +47 -0
  508. package/dist/src/services/cli.js.map +1 -0
  509. package/dist/src/services/index.d.ts +8 -0
  510. package/dist/src/services/index.d.ts.map +1 -0
  511. package/dist/src/services/index.js +13 -0
  512. package/dist/src/services/index.js.map +1 -0
  513. package/dist/src/services/leader.d.ts +31 -0
  514. package/dist/src/services/leader.d.ts.map +1 -0
  515. package/dist/src/services/leader.js +176 -0
  516. package/dist/src/services/leader.js.map +1 -0
  517. package/dist/src/services/logger.d.ts +60 -0
  518. package/dist/src/services/logger.d.ts.map +1 -0
  519. package/dist/src/services/logger.js +349 -0
  520. package/dist/src/services/logger.js.map +1 -0
  521. package/dist/src/services/mail/index.d.ts +57 -0
  522. package/dist/src/services/mail/index.d.ts.map +1 -0
  523. package/dist/src/services/mail/index.js +89 -0
  524. package/dist/src/services/mail/index.js.map +1 -0
  525. package/dist/src/services/mail/postmark.d.ts +11 -0
  526. package/dist/src/services/mail/postmark.d.ts.map +1 -0
  527. package/dist/src/services/mail/postmark.js +41 -0
  528. package/dist/src/services/mail/postmark.js.map +1 -0
  529. package/dist/src/services/mail/smtp.d.ts +11 -0
  530. package/dist/src/services/mail/smtp.d.ts.map +1 -0
  531. package/dist/src/services/mail/smtp.js +50 -0
  532. package/dist/src/services/mail/smtp.js.map +1 -0
  533. package/dist/src/services/mesh-client/index.d.ts +9 -0
  534. package/dist/src/services/mesh-client/index.d.ts.map +1 -0
  535. package/dist/src/services/mesh-client/index.js +18 -0
  536. package/dist/src/services/mesh-client/index.js.map +1 -0
  537. package/dist/src/services/mesh-client/mesh-client-redis-registry.d.ts +23 -0
  538. package/dist/src/services/mesh-client/mesh-client-redis-registry.d.ts.map +1 -0
  539. package/dist/src/services/mesh-client/mesh-client-redis-registry.js +360 -0
  540. package/dist/src/services/mesh-client/mesh-client-redis-registry.js.map +1 -0
  541. package/dist/src/services/mesh-client/mesh-client-registry.d.ts +16 -0
  542. package/dist/src/services/mesh-client/mesh-client-registry.d.ts.map +1 -0
  543. package/dist/src/services/mesh-client/mesh-client-registry.js +44 -0
  544. package/dist/src/services/mesh-client/mesh-client-registry.js.map +1 -0
  545. package/dist/src/services/mesh-client/mesh-client-service.d.ts +88 -0
  546. package/dist/src/services/mesh-client/mesh-client-service.d.ts.map +1 -0
  547. package/dist/src/services/mesh-client/mesh-client-service.js +222 -0
  548. package/dist/src/services/mesh-client/mesh-client-service.js.map +1 -0
  549. package/dist/src/services/mesh-client/mesh-srpc-server.d.ts +95 -0
  550. package/dist/src/services/mesh-client/mesh-srpc-server.d.ts.map +1 -0
  551. package/dist/src/services/mesh-client/mesh-srpc-server.js +475 -0
  552. package/dist/src/services/mesh-client/mesh-srpc-server.js.map +1 -0
  553. package/dist/src/services/mesh-client/types.d.ts +36 -0
  554. package/dist/src/services/mesh-client/types.d.ts.map +1 -0
  555. package/dist/src/services/mesh-client/types.js +38 -0
  556. package/dist/src/services/mesh-client/types.js.map +1 -0
  557. package/dist/src/services/mesh.d.ts +73 -0
  558. package/dist/src/services/mesh.d.ts.map +1 -0
  559. package/dist/src/services/mesh.js +511 -0
  560. package/dist/src/services/mesh.js.map +1 -0
  561. package/dist/src/services/worker/entity.d.ts +26 -0
  562. package/dist/src/services/worker/entity.d.ts.map +1 -0
  563. package/dist/src/services/worker/entity.js +30 -0
  564. package/dist/src/services/worker/entity.js.map +1 -0
  565. package/dist/src/services/worker/index.d.ts +25 -0
  566. package/dist/src/services/worker/index.d.ts.map +1 -0
  567. package/dist/src/services/worker/index.js +52 -0
  568. package/dist/src/services/worker/index.js.map +1 -0
  569. package/dist/src/services/worker/observer.d.ts +13 -0
  570. package/dist/src/services/worker/observer.d.ts.map +1 -0
  571. package/dist/src/services/worker/observer.js +22 -0
  572. package/dist/src/services/worker/observer.js.map +1 -0
  573. package/dist/src/services/worker/queue.d.ts +38 -0
  574. package/dist/src/services/worker/queue.d.ts.map +1 -0
  575. package/dist/src/services/worker/queue.js +227 -0
  576. package/dist/src/services/worker/queue.js.map +1 -0
  577. package/dist/src/services/worker/recorder.d.ts +17 -0
  578. package/dist/src/services/worker/recorder.d.ts.map +1 -0
  579. package/dist/src/services/worker/recorder.js +88 -0
  580. package/dist/src/services/worker/recorder.js.map +1 -0
  581. package/dist/src/services/worker/runner.d.ts +37 -0
  582. package/dist/src/services/worker/runner.d.ts.map +1 -0
  583. package/dist/src/services/worker/runner.js +319 -0
  584. package/dist/src/services/worker/runner.js.map +1 -0
  585. package/dist/src/services/worker/types.d.ts +63 -0
  586. package/dist/src/services/worker/types.d.ts.map +1 -0
  587. package/dist/src/services/worker/types.js +38 -0
  588. package/dist/src/services/worker/types.js.map +1 -0
  589. package/dist/src/srpc/SrpcByteStream.d.ts +60 -0
  590. package/dist/src/srpc/SrpcByteStream.d.ts.map +1 -0
  591. package/dist/src/srpc/SrpcByteStream.js +237 -0
  592. package/dist/src/srpc/SrpcByteStream.js.map +1 -0
  593. package/dist/src/srpc/SrpcClient.d.ts +67 -0
  594. package/dist/src/srpc/SrpcClient.d.ts.map +1 -0
  595. package/dist/src/srpc/SrpcClient.js +406 -0
  596. package/dist/src/srpc/SrpcClient.js.map +1 -0
  597. package/dist/src/srpc/SrpcServer.d.ts +56 -0
  598. package/dist/src/srpc/SrpcServer.d.ts.map +1 -0
  599. package/dist/src/srpc/SrpcServer.js +519 -0
  600. package/dist/src/srpc/SrpcServer.js.map +1 -0
  601. package/dist/src/srpc/index.d.ts +9 -0
  602. package/dist/src/srpc/index.d.ts.map +1 -0
  603. package/dist/src/srpc/index.js +17 -0
  604. package/dist/src/srpc/index.js.map +1 -0
  605. package/dist/src/srpc/observer.d.ts +21 -0
  606. package/dist/src/srpc/observer.d.ts.map +1 -0
  607. package/dist/src/srpc/observer.js +22 -0
  608. package/dist/src/srpc/observer.js.map +1 -0
  609. package/dist/src/srpc/types.d.ts +92 -0
  610. package/dist/src/srpc/types.d.ts.map +1 -0
  611. package/dist/src/srpc/types.js +28 -0
  612. package/dist/src/srpc/types.js.map +1 -0
  613. package/dist/src/telemetry/index.d.ts +3 -0
  614. package/dist/src/telemetry/index.d.ts.map +1 -0
  615. package/dist/src/telemetry/index.js +22 -0
  616. package/dist/src/telemetry/index.js.map +1 -0
  617. package/dist/src/telemetry/otel/helpers.d.ts +45 -0
  618. package/dist/src/telemetry/otel/helpers.d.ts.map +1 -0
  619. package/dist/src/telemetry/otel/helpers.js +142 -0
  620. package/dist/src/telemetry/otel/helpers.js.map +1 -0
  621. package/dist/src/telemetry/otel/index.d.ts +22 -0
  622. package/dist/src/telemetry/otel/index.d.ts.map +1 -0
  623. package/dist/src/telemetry/otel/index.js +268 -0
  624. package/dist/src/telemetry/otel/index.js.map +1 -0
  625. package/dist/src/telemetry/otel/metrics.controller.d.ts +5 -0
  626. package/dist/src/telemetry/otel/metrics.controller.d.ts.map +1 -0
  627. package/dist/src/telemetry/otel/metrics.controller.js +82 -0
  628. package/dist/src/telemetry/otel/metrics.controller.js.map +1 -0
  629. package/dist/src/telemetry/otel/metrics.d.ts +2 -0
  630. package/dist/src/telemetry/otel/metrics.d.ts.map +1 -0
  631. package/dist/src/telemetry/otel/metrics.js +16 -0
  632. package/dist/src/telemetry/otel/metrics.js.map +1 -0
  633. package/dist/src/telemetry/sentry.d.ts +9 -0
  634. package/dist/src/telemetry/sentry.d.ts.map +1 -0
  635. package/dist/src/telemetry/sentry.js +63 -0
  636. package/dist/src/telemetry/sentry.js.map +1 -0
  637. package/dist/src/testing/database-readiness.d.ts +11 -0
  638. package/dist/src/testing/database-readiness.d.ts.map +1 -0
  639. package/dist/src/testing/database-readiness.js +102 -0
  640. package/dist/src/testing/database-readiness.js.map +1 -0
  641. package/dist/src/testing/expect.d.ts +21 -0
  642. package/dist/src/testing/expect.d.ts.map +1 -0
  643. package/dist/src/testing/expect.js +110 -0
  644. package/dist/src/testing/expect.js.map +1 -0
  645. package/dist/src/testing/fixtures.d.ts +18 -0
  646. package/dist/src/testing/fixtures.d.ts.map +1 -0
  647. package/dist/src/testing/fixtures.js +46 -0
  648. package/dist/src/testing/fixtures.js.map +1 -0
  649. package/dist/src/testing/index.d.ts +143 -0
  650. package/dist/src/testing/index.d.ts.map +1 -0
  651. package/dist/src/testing/index.js +993 -0
  652. package/dist/src/testing/index.js.map +1 -0
  653. package/dist/src/testing/mysql-session-manager-process.d.ts +3 -0
  654. package/dist/src/testing/mysql-session-manager-process.d.ts.map +1 -0
  655. package/dist/src/testing/mysql-session-manager-process.js +77 -0
  656. package/dist/src/testing/mysql-session-manager-process.js.map +1 -0
  657. package/dist/src/testing/mysql-session-manager.d.ts +59 -0
  658. package/dist/src/testing/mysql-session-manager.d.ts.map +1 -0
  659. package/dist/src/testing/mysql-session-manager.js +910 -0
  660. package/dist/src/testing/mysql-session-manager.js.map +1 -0
  661. package/dist/src/testing/sql.d.ts +47 -0
  662. package/dist/src/testing/sql.d.ts.map +1 -0
  663. package/dist/src/testing/sql.js +313 -0
  664. package/dist/src/testing/sql.js.map +1 -0
  665. package/dist/src/type-compiler/go/ast_expression.go +161 -0
  666. package/dist/src/type-compiler/go/ast_metadata.go +355 -0
  667. package/dist/src/type-compiler/go/collect.go +806 -0
  668. package/dist/src/type-compiler/go/emission_plan.go +205 -0
  669. package/dist/src/type-compiler/go/emit_ast.go +406 -0
  670. package/dist/src/type-compiler/go/emit_ast_test.go +248 -0
  671. package/dist/src/type-compiler/go/go.mod +10 -0
  672. package/dist/src/type-compiler/go/plugin.go +308 -0
  673. package/dist/src/type-compiler/go/plugin_test.go +752 -0
  674. package/dist/src/type-compiler/go/precompute.go +86 -0
  675. package/dist/src/type-compiler/go/receive_type.go +837 -0
  676. package/dist/src/type-compiler/go/resolve.go +265 -0
  677. package/dist/src/type-compiler/go/source_scan.go +51 -0
  678. package/dist/src/type-compiler/go/text_parse.go +671 -0
  679. package/dist/src/type-compiler/go/type_expr.go +1227 -0
  680. package/dist/src/type-compiler/go/typia_expr.go +2119 -0
  681. package/dist/src/type-compiler/index.cjs +6 -0
  682. package/dist/src/types/index.d.ts +7 -0
  683. package/dist/src/types/index.d.ts.map +1 -0
  684. package/dist/src/types/index.js +14 -0
  685. package/dist/src/types/index.js.map +1 -0
  686. package/dist/src/types/phone.d.ts +6 -0
  687. package/dist/src/types/phone.d.ts.map +1 -0
  688. package/dist/src/types/phone.js +64 -0
  689. package/dist/src/types/phone.js.map +1 -0
  690. package/dist/src/types/primitives.d.ts +33 -0
  691. package/dist/src/types/primitives.d.ts.map +1 -0
  692. package/dist/src/types/primitives.js +5 -0
  693. package/dist/src/types/primitives.js.map +1 -0
  694. package/dist/src/types/runtime.d.ts +5 -0
  695. package/dist/src/types/runtime.d.ts.map +1 -0
  696. package/dist/src/types/runtime.js +20 -0
  697. package/dist/src/types/runtime.js.map +1 -0
  698. package/dist/src/types/type-annotations.d.ts +28 -0
  699. package/dist/src/types/type-annotations.d.ts.map +1 -0
  700. package/dist/src/types/type-annotations.js +33 -0
  701. package/dist/src/types/type-annotations.js.map +1 -0
  702. package/dist/src/types.d.ts +2 -0
  703. package/dist/src/types.d.ts.map +1 -0
  704. package/dist/src/types.js +7 -0
  705. package/dist/src/types.js.map +1 -0
  706. package/docs/.vitepress/config.mts +85 -0
  707. package/docs/content/CONTRIBUTING.md +53 -0
  708. package/docs/content/README-DEV.md +59 -0
  709. package/docs/content/README.md +52 -0
  710. package/docs/content/authentication.md +213 -0
  711. package/docs/content/cli.md +214 -0
  712. package/docs/content/configuration.md +191 -0
  713. package/docs/content/database.md +476 -0
  714. package/docs/content/devconsole.md +148 -0
  715. package/docs/content/di.md +212 -0
  716. package/docs/content/documentation-plan.md +182 -0
  717. package/docs/content/env.md +120 -0
  718. package/docs/content/getting-started.md +324 -0
  719. package/docs/content/health.md +64 -0
  720. package/docs/content/helpers.md +294 -0
  721. package/docs/content/http.md +402 -0
  722. package/docs/content/index.md +109 -0
  723. package/docs/content/leader-service.md +98 -0
  724. package/docs/content/logging.md +225 -0
  725. package/docs/content/mail.md +171 -0
  726. package/docs/content/mesh-client.md +333 -0
  727. package/docs/content/mesh-service.md +255 -0
  728. package/docs/content/migrations.md +190 -0
  729. package/docs/content/openapi.md +134 -0
  730. package/docs/content/overview.md +98 -0
  731. package/docs/content/public/images/devconsole/01-dashboard.png +0 -0
  732. package/docs/content/public/images/devconsole/02-routes.png +0 -0
  733. package/docs/content/public/images/devconsole/03-openapi.png +0 -0
  734. package/docs/content/public/images/devconsole/04-requests.png +0 -0
  735. package/docs/content/public/images/devconsole/05-srpc.png +0 -0
  736. package/docs/content/public/images/devconsole/06-database.png +0 -0
  737. package/docs/content/public/images/devconsole/06b-database-log.png +0 -0
  738. package/docs/content/public/images/devconsole/07-health.png +0 -0
  739. package/docs/content/public/images/devconsole/08-mutex.png +0 -0
  740. package/docs/content/public/images/devconsole/09-repl.png +0 -0
  741. package/docs/content/public/images/devconsole/10-workers.png +0 -0
  742. package/docs/content/public-api.md +84 -0
  743. package/docs/content/redis.md +174 -0
  744. package/docs/content/reflection.md +180 -0
  745. package/docs/content/release.md +100 -0
  746. package/docs/content/sql.md +121 -0
  747. package/docs/content/srpc.md +292 -0
  748. package/docs/content/telemetry.md +173 -0
  749. package/docs/content/testing.md +327 -0
  750. package/docs/content/type-reflection-architecture.md +149 -0
  751. package/docs/content/types.md +286 -0
  752. package/docs/content/uploads.md +145 -0
  753. package/docs/content/worker.md +182 -0
  754. package/docs/openapi.md +3 -0
  755. package/package.json +124 -0
  756. package/resources/proto/devconsole.proto +286 -0
  757. package/template-app/.env.development +10 -0
  758. package/template-app/gitignore.tmpl +11 -0
  759. package/template-app/package.json.tmpl +25 -0
  760. package/template-app/src/app.ts +13 -0
  761. package/template-app/src/config.ts +5 -0
  762. package/template-app/src/controllers/Example.controller.ts +19 -0
  763. package/template-app/src/database.ts +5 -0
  764. package/template-app/src/entities/Example.entity.ts +9 -0
  765. package/template-app/src/index.ts +7 -0
  766. package/template-app/src/migrations/.gitkeep +2 -0
  767. package/template-app/src/services/Example.service.ts +20 -0
  768. package/template-app/tests/app.spec.ts +8 -0
  769. package/template-app/tsconfig.json +26 -0
  770. package/template-app/tsconfig.test.json +5 -0
  771. package/types.d.ts +4 -0
@@ -0,0 +1,213 @@
1
+ # Authentication
2
+
3
+ TSF includes JWT helpers, request authentication utilities, entity auth middleware, HTTP Basic auth middleware, password hashing, and reset tokens.
4
+
5
+ ## JWT Configuration
6
+
7
+ Generated JWTs use HS256 when an HMAC secret is configured and EdDSA when `AUTH_JWT_ED_SECRET` is configured. Exactly one secret source may be configured: `AUTH_JWT_SECRET`, `AUTH_JWT_SECRET_B64`, or `AUTH_JWT_ED_SECRET`. Conflicts are rejected when JWT signing or configured-key verification first resolves the key.
8
+
9
+ | Config key | Description |
10
+ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
11
+ | `AUTH_JWT_SECRET` | Plain string HMAC secret. Mutually exclusive with the base64 and Ed25519 secrets. |
12
+ | `AUTH_JWT_SECRET_B64` | Base64-encoded HMAC secret. Mutually exclusive with the plain and Ed25519 secrets. |
13
+ | `AUTH_JWT_ED_SECRET` | Base64 DER or PEM PKCS#8 Ed25519 private key. Mutually exclusive with both HMAC secrets. |
14
+ | `AUTH_JWT_ISSUER` | Default issuer. |
15
+ | `AUTH_JWT_EXPIRATION_MINS` | Default token lifetime. Defaults to 60 minutes. |
16
+ | `AUTH_JWT_COOKIE_NAME` | Cookie name. Defaults to `jwt`. |
17
+ | `AUTH_JWT_ENABLE_VERIFY` | When false, request processing only decodes tokens; signatures, required claims, and expiry are not checked. Defaults to true. |
18
+
19
+ ::: danger Verification must stay enabled at trust boundaries
20
+ Setting `AUTH_JWT_ENABLE_VERIFY=false` makes `JWT.process()`, request helpers, and `ParsedJwt` injection trust any decodable token, including one with a forged signature, missing claims, or an expired `exp`. `JWT.decode()` has the same validation bypass regardless of configuration. Use either only for explicitly untrusted inspection or tightly controlled compatibility work, never to authorize a request.
21
+ :::
22
+
23
+ ## Generating JWTs
24
+
25
+ ```ts
26
+ import { JWT } from '@zyno-io/ts-server-foundation';
27
+
28
+ const token = await JWT.generate({
29
+ subject: String(user.id),
30
+ payload: { role: user.role }
31
+ });
32
+
33
+ await JWT.generateCookie({ subject: String(user.id) }, response, {
34
+ sameSite: 'Lax',
35
+ secure: true
36
+ });
37
+
38
+ await JWT.clearCookie(response);
39
+ ```
40
+
41
+ JWT cookies default to the configured `AUTH_JWT_COOKIE_NAME` or `jwt`, with `Path=/`, `HttpOnly`, `Secure`, and `SameSite=Lax`. Pass `secure: false` only when the transport is intentionally not HTTPS. `clearCookie()` uses the same attributes and an expiration in 1970, so pass matching `domain`, `sameSite`, and `secure` options when clearing a customized cookie.
42
+
43
+ Generation options:
44
+
45
+ | Option | Description |
46
+ | ------------ | ------------------------------------------ |
47
+ | `id` | Optional JWT ID stored as `jti`. |
48
+ | `issuer` | Overrides `AUTH_JWT_ISSUER`. |
49
+ | `audience` | String or string array audience. |
50
+ | `subject` | Required subject. |
51
+ | `expiresAt` | Expiration as `Date` or Unix milliseconds. |
52
+ | `expiryMins` | Relative expiration in minutes. |
53
+ | `payload` | Extra application claims. |
54
+
55
+ ## Verifying And Decoding
56
+
57
+ ```ts
58
+ const result = await JWT.verify<{ role: string }>(token);
59
+
60
+ if (result.isValid) {
61
+ result.subject;
62
+ result.payload.role;
63
+ result.expiresAt;
64
+ } else {
65
+ result.isDecodable;
66
+ result.isSignatureValid;
67
+ result.isPayloadValid;
68
+ result.isNotExpired;
69
+ }
70
+ ```
71
+
72
+ Helpers:
73
+
74
+ | Helper | Description |
75
+ | ----------------------------------- | --------------------------------------------------------------------------- |
76
+ | `JWT.verify(token, key?, options?)` | Verifies signatures and standard claims with an explicit or configured key. |
77
+ | `JWT.decode(token)` | Decodes without validating signatures, required claims, or expiry. |
78
+ | `JWT.process(token)` | Fully verifies or only decodes according to `AUTH_JWT_ENABLE_VERIFY`. |
79
+ | `JWT.processWithRequest(request)` | Reads Bearer token or JWT cookie from a request. |
80
+ | `JWT.createVerifier(options)` | Returns a reusable async verifier. |
81
+
82
+ `processWithRequest()` checks `Authorization: Bearer <token>` first, then the configured JWT cookie.
83
+
84
+ Verification requires `iss`, non-empty `sub`, numeric `iat`, and numeric `exp`; expiration and any requested issuer/audience are enforced. `aud` is optional unless a verifier specifies an audience. Generated tokens always include `iss`, `sub`, `iat`, and `exp`.
85
+
86
+ `JWT.generate()` pins signing to HS256 or EdDSA from configuration. `JWT.verify()` and `JWT.createVerifier()` restrict verification to one algorithm only when their `algorithm` option is supplied. With no explicit algorithm, `fast-jwt` validates the token using the supplied/configured key and its compatible algorithms. An unknown explicit algorithm returns an invalid result instead of falling back. For an EdDSA verifier created with an explicit public key, pass `algorithm: 'EdDSA'` so TSF normalizes a bare base64 SPKI key correctly.
87
+
88
+ Bearer precedence applies once the header matches `Bearer <non-whitespace-token>`. If that selected token is invalid, TSF returns the invalid result and does not fall back to a valid cookie. A missing or malformed/non-Bearer authorization header still allows cookie lookup.
89
+
90
+ `JWT.decode()` produces a `ParsedJwt` from decodable payload fields but does not prove their type, presence, signature, or freshness. Its `isValid: true` means decoding succeeded, not that the token is trustworthy.
91
+
92
+ ## Controller Injection
93
+
94
+ Controllers can request `ParsedJwt<T>` directly. The parameter is required unless it is optional.
95
+
96
+ ```ts
97
+ import { http, ParsedJwt } from '@zyno-io/ts-server-foundation';
98
+
99
+ interface SessionClaims {
100
+ role: string;
101
+ }
102
+
103
+ @http.controller('/session')
104
+ class SessionController {
105
+ @http.GET('/me')
106
+ async me(jwt: ParsedJwt<SessionClaims>) {
107
+ return { subject: jwt.subject, role: jwt.payload.role };
108
+ }
109
+ }
110
+ ```
111
+
112
+ With verification enabled, invalid or expired JWTs produce `HttpUnauthorizedError`; a missing required JWT always does. An optional `ParsedJwt` accepts absence, but a token that is present and invalid still produces `401`. When `AUTH_JWT_ENABLE_VERIFY=false`, any decodable token bypasses signature, claim, and expiry checks.
113
+
114
+ ## Request Helpers
115
+
116
+ ```ts
117
+ import { resolveEntityFromRequestJwt, getSubjectFromRequestJwt, getJwtFromRequest } from '@zyno-io/ts-server-foundation';
118
+
119
+ const jwt = await getJwtFromRequest(request);
120
+ const userId = await getSubjectFromRequestJwt(request);
121
+ const user = await resolveEntityFromRequestJwt(request, User);
122
+ ```
123
+
124
+ JWT processing is cached per request.
125
+
126
+ ## Entity Auth Middleware
127
+
128
+ `createAuthMiddleware(Entity)` creates a middleware class that requires a JWT subject and can optionally validate the resolved entity.
129
+
130
+ ```ts
131
+ import {
132
+ createApp,
133
+ createAuthMiddleware,
134
+ resolveEntityFromRequestJwt,
135
+ http,
136
+ HttpRequest,
137
+ HttpUnauthorizedError
138
+ } from '@zyno-io/ts-server-foundation';
139
+
140
+ class UserAuthMiddleware extends createAuthMiddleware(User) {
141
+ async validateEntity(_request: HttpRequest, user: User) {
142
+ if (user.disabled || user.deletedAt) throw new HttpUnauthorizedError('Account is not active');
143
+ }
144
+ }
145
+
146
+ @http.controller('/account')
147
+ class AccountController {
148
+ @(http.GET('/me').use(UserAuthMiddleware))
149
+ async me(request: HttpRequest) {
150
+ return await resolveEntityFromRequestJwt(request, User);
151
+ }
152
+ }
153
+
154
+ const app = createApp({
155
+ providers: [UserAuthMiddleware],
156
+ controllers: [AccountController]
157
+ });
158
+ ```
159
+
160
+ `handle()` always resolves and caches the subject for the request. If the generated middleware class does not define `validateEntity()`, it does not query the database; this is an authentication-presence/subject check only. When a hook is present, the middleware loads the entity with `getEntityOrUndefined()`, rejects a missing entity, caches the loaded entity for that request, and invokes the hook. Repeated middleware execution on the same request reuses the cached subject and entity, although the validation hook runs each time.
161
+
162
+ ## Custom Entity Resolvers
163
+
164
+ `resolveEntityFromRequestJwt(contextOrRequest, Entity)` can be used as a custom parameter resolver helper. It throws unauthorized for missing non-optional route parameters.
165
+
166
+ `createCachingParameterResolver(key, resolver)` wraps a route parameter resolver and caches its value per request.
167
+
168
+ ## HTTP Basic Auth
169
+
170
+ ```ts
171
+ import { createBasicAuthMiddleware, http } from '@zyno-io/ts-server-foundation';
172
+
173
+ const AdminBasicAuth = createBasicAuthMiddleware('admin');
174
+
175
+ @http.controller('/admin')
176
+ class AdminController {
177
+ @(http.GET('/stats').use(AdminBasicAuth))
178
+ async stats() {
179
+ return { ok: true };
180
+ }
181
+ }
182
+ ```
183
+
184
+ The password must match `AUTH_BASIC_SECRET`. When an expected username is provided, the username must match too.
185
+
186
+ ## Password Hashing
187
+
188
+ ```ts
189
+ import { Auth } from '@zyno-io/ts-server-foundation';
190
+
191
+ const hash = await Auth.hashPassword('secret');
192
+ const valid = await Auth.verifyHash('secret', hash);
193
+ ```
194
+
195
+ New passwords are hashed with `scrypt` and a random salt. Encoded hashes use the format `scrypt$<salt>$<hash>`. `verifyHash()` also accepts existing bcrypt hashes (including the common `$2y$` variant), which supports migrations from bcrypt-backed applications without rehashing every password at once.
196
+
197
+ ## Reset Tokens
198
+
199
+ ```ts
200
+ const reset = await Auth.generateResetToken({ userId: user.id });
201
+ const decoded = await Auth.decodeResetToken<{ userId: number }>(reset.token);
202
+ ```
203
+
204
+ Reset tokens use three base64url-safe parts: a base36 Unix timestamp in seconds, 16 random bytes, and the JSON payload. `generationTime` is returned in Unix milliseconds at whole-second precision. The payload is encoded, not encrypted or signed; use the random-byte `verifier` for server-side validation and enforce expiration in application code. `decodeResetToken()` validates the token structure and payload but does not check a stored verifier or an expiry policy.
205
+
206
+ The returned `ResetToken<T>` contains:
207
+
208
+ | Field | Description |
209
+ | ---------------- | ----------------------------------------------------- |
210
+ | `token` | Encoded token string. |
211
+ | `data` | JSON-serializable payload. |
212
+ | `generationTime` | Unix timestamp in milliseconds. |
213
+ | `verifier` | SHA-256 verifier derived from the random token bytes. |
@@ -0,0 +1,214 @@
1
+ # CLI Tools
2
+
3
+ TSF ships application scaffolding, compiler setup, development orchestration, tests, migrations, OpenAPI generation, and protobuf generation as package binaries. All TSF-owned commands use the `tsf` prefix.
4
+
5
+ ## Package Binaries
6
+
7
+ | Binary | Description |
8
+ | --- | --- |
9
+ | `tsf` | Umbrella CLI for `create-app`, `test`, and `gen-proto`. |
10
+ | `ts-server-foundation` | Alias for the umbrella CLI. |
11
+ | `tsf-create-app` | Scaffold a new app from `template-app`. |
12
+ | `tsf-dev` | Build/watch/run/test and application development workflows. |
13
+ | `tsf-test` | Compile-output-aware Node test runner. |
14
+ | `tsf-migrate` | Create, run, reset, and charset migration commands. |
15
+ | `tsf-gen-proto` | Generate TypeScript protobuf codecs through `ts-proto`. |
16
+ | `tsf-install` | Configure the supported TypeScript 7/`ttsc` compiler and TSF transform. |
17
+ | `tsf-update` | Reserved update command; currently reports that no automatic updater is available. |
18
+
19
+ ## Umbrella Command
20
+
21
+ `tsf` forwards to the matching standalone binary:
22
+
23
+ ```bash
24
+ tsf create-app <package-name> [path]
25
+ tsf test [node-test-options] [test-files-or-dirs...]
26
+ tsf gen-proto <proto-file-or-dir> <output-dir> [options]
27
+ ```
28
+
29
+ The standalone names remain useful in package scripts and when a command needs to be invoked directly.
30
+
31
+ ## App Scaffolding
32
+
33
+ ```bash
34
+ npx @zyno-io/ts-server-foundation create-app my-api
35
+ npx @zyno-io/ts-server-foundation create-app @myorg/my-api
36
+ tsf-create-app @myorg/my-api ./services/api
37
+ ```
38
+
39
+ The first argument must be a valid npm package name. The output path defaults to the unscoped package name, so `@myorg/my-api` creates `./my-api/`. Scaffolding refuses to overwrite an existing directory.
40
+
41
+ The command copies `template-app` and fills in:
42
+
43
+ - package and database names
44
+ - the Redis prefix
45
+ - the TSF package version
46
+ - the supported `typescript` and `ttsc` versions
47
+ - template `.gitignore` and other `.tmpl` file names
48
+
49
+ When scaffolding from an unpublished `0.0.0-dev` checkout, the generated TSF dependency uses `*`; published versions use a compatible `^<version>` range. The generated app prints its install and development commands when complete.
50
+
51
+ ## Development Workflow
52
+
53
+ ```bash
54
+ tsf-dev <command> [options]
55
+ ```
56
+
57
+ All commands resolve the project root from the working directory. `-p <file>` and `--tsconfig <file>` select a TypeScript config where applicable.
58
+
59
+ | Command | Behavior |
60
+ | --- | --- |
61
+ | `clean` | Removes `dist/`. |
62
+ | `build [--watch]` | Ensures compiler setup, cleans when needed, and compiles with the supported `ttsc`. |
63
+ | `run [--debug] [script] -- <app-command>` | Ensures a watch build, then starts Node with source maps, file watching, and the requested app command. |
64
+ | `test [--debug]` | Builds the test config and delegates to `tsf-test`. |
65
+ | `migrate [--debug]` | Builds, then invokes the package entrypoint with `migrate:run`. |
66
+ | `migrate:create [--debug]` | Builds, then delegates to `tsf-migrate create`. |
67
+ | `migrate:reset [--debug]` | Builds, then delegates to `tsf-migrate reset`. |
68
+ | `migrate:charset [--debug]` | Builds, then delegates to `tsf-migrate charset`. |
69
+ | `openapi:generate` | Builds, then invokes the package entrypoint with `openapi:generate`. |
70
+
71
+ ### Build And Watch
72
+
73
+ ```bash
74
+ tsf-dev clean
75
+ tsf-dev build
76
+ tsf-dev build --watch
77
+ tsf-dev build -p tsconfig.test.json
78
+ ```
79
+
80
+ `tsf-dev build` records a fingerprint of compiler inputs and outputs under `dist/`. A later command reuses a fresh build; changing TypeScript/JavaScript sources, JSON configuration, or the lockfile invalidates it. Watch mode uses the selected tsconfig's files/include/exclude/outDir rules and ignores generated and dependency directories.
81
+
82
+ `tsf-install` runs before normal development builds so the project uses the package-supported compiler versions and transform. Test builds are the exception: `tsf-dev test` compiles directly and does not mutate package/compiler setup during a test run.
83
+
84
+ ### Run
85
+
86
+ ```bash
87
+ tsf-dev run -- server:start
88
+ tsf-dev run -- worker:start
89
+ tsf-dev run dist/custom-entry.js -- maintenance:run
90
+ tsf-dev run --debug -- server:start
91
+ ```
92
+
93
+ Arguments before `--` belong to `tsf-dev`; arguments after it are passed to the application. The script defaults to `.`, which asks Node to load the package `main`. An explicit app command is required by scaffolded applications.
94
+
95
+ The first `tsf-dev run` for a project owns the compiler watcher. Concurrent run processes share its build-ready state instead of starting duplicate compilers. If an existing output fingerprint is fresh, the watcher waits for an input change before compiling again.
96
+
97
+ Normal run mode enables the Node inspector. `--debug` changes it to `--inspect-brk`. When `PORT` is set, the inspector uses `PORT + 1000`; otherwise Node selects/reports its inspector port.
98
+
99
+ ### Tests
100
+
101
+ ```bash
102
+ tsf-dev test
103
+ tsf-dev test tests/http.spec.ts
104
+ tsf-dev test --test-name-pattern='uploads'
105
+ tsf-dev test --debug tests/http.spec.ts
106
+ ```
107
+
108
+ The command selects `tsconfig.test.json` when present, otherwise `tsconfig.json`, compiles if needed, and forwards remaining Node test flags and file/directory selectors to `tsf-test`. Debug mode starts with `--inspect-brk=9268`.
109
+
110
+ ## Test Runner
111
+
112
+ ```bash
113
+ tsf-test [node-test-options] [test-files-or-dirs...]
114
+ ```
115
+
116
+ `tsf-test` sets `APP_ENV=test` and `TZ=UTC`, maps source selectors such as `tests/http.spec.ts` to compiled files under `dist/tests/`, and runs Node with source maps, a 180-second per-test timeout, and forced process exit. With no selector it discovers compiled `*.spec.js` files below `dist/tests`.
117
+
118
+ If `dist/tests/shared/globalSetup.js` exists, its optional `setup()` runs before the test subprocess and `teardown()` runs after it. See [Testing](./testing.md#global-setup-and-module-state).
119
+
120
+ When MySQL test configuration is available and savepoints are allowed, the runner starts a shared MySQL session manager. Its pool size follows `--test-concurrency` or defaults to available parallelism minus one. Control it with:
121
+
122
+ | Environment key | Behavior |
123
+ | --- | --- |
124
+ | `TSF_TEST_MYSQL_SESSION_MANAGER=0` | Disable the shared manager. |
125
+ | `TSF_TEST_MYSQL_SESSION_MANAGER=1` | Force the manager on; missing MySQL configuration still fails startup. |
126
+ | `TSF_TEST_ALLOW_SAVEPOINTS=0` | Disable savepoint-backed facade reuse globally. |
127
+ | `TEST_RUN_TS=<value>` | Reuse an explicit run identifier for generated test database names. |
128
+
129
+ Database readiness is checked only by database-enabled facades, not as a runner-wide preflight.
130
+
131
+ ## Migrations
132
+
133
+ Use `tsf-dev migrate*` during development when source must be compiled first. Use `tsf-migrate` directly when compiled application output already exists.
134
+
135
+ ```bash
136
+ tsf-migrate create [options]
137
+ tsf-migrate run [options]
138
+ tsf-migrate reset [options]
139
+ tsf-migrate charset [charset collation] [options]
140
+ ```
141
+
142
+ | Command | Behavior |
143
+ | --- | --- |
144
+ | `create` | Diffs reflected entity schemas against the live database and writes a raw-SQL migration when changes exist. `create:raw` is an alias. |
145
+ | `run` | Loads compiled migrations and runs migrations not recorded in `_migrations`. |
146
+ | `reset` | Removes source migration files and creates one base migration from registered entities. |
147
+ | `charset` | Standardizes the MySQL database and table charset/collation; PostgreSQL reports a skipped operation. |
148
+
149
+ Options:
150
+
151
+ | Option | Description |
152
+ | --- | --- |
153
+ | `--app <path>` | Compiled app module. Defaults to `dist/src/app.js`. |
154
+ | `--description <text>`, `-d <text>` | Migration description. Defaults to `auto_migration`. |
155
+ | `--migrations-dir <path>` | Source migration directory. Defaults to `src/migrations`. |
156
+ | `--pg-schema <schema>` | PostgreSQL schema used for diff/reset. Defaults to the database reader's schema. |
157
+ | `--table <name>` | Limits a create diff to one table. Repeatable. |
158
+ | `--tables <a,b>` | Limits a create diff to a comma-separated table list. |
159
+
160
+ Option values may also use `--name=value`. Table names are de-duplicated; empty values and unknown options fail rather than being ignored.
161
+
162
+ The app module may export an `App` instance or zero-argument app factory as `app` or `default`. As a compatibility fallback, a zero-argument named export matching `create*App` is also accepted. The CLI resolves `BaseDatabase` through that app and closes the database driver when the command completes.
163
+
164
+ For `run`, a source path containing `src` maps to the equivalent compiled `dist` path. Pass a path already containing `dist` to load it directly. See [Migrations](./migrations.md) for migration file format, directory loading, schema diffs, reset behavior, and charset defaults.
165
+
166
+ Migration debug mode under `tsf-dev` uses `--inspect-brk=9226`.
167
+
168
+ ## OpenAPI Generation
169
+
170
+ ```bash
171
+ tsf-dev openapi:generate
172
+ tsf-dev openapi:generate -p tsconfig.json
173
+ ```
174
+
175
+ This builds the project, then runs `node . openapi:generate`. The built-in `App.run()` command serializes registered routes to `openapi.yaml` without binding the HTTP server. The application package must expose its compiled entrypoint through `package.json#main`, as scaffolded TSF apps do.
176
+
177
+ Runtime OpenAPI routes and serializer options are documented in [OpenAPI](./openapi.md).
178
+
179
+ ## Proto Generation
180
+
181
+ ```bash
182
+ tsf-gen-proto resources/proto/service.proto src/generated/proto
183
+ tsf-gen-proto resources/proto src/generated/proto --only-types
184
+ ```
185
+
186
+ The input may be one `.proto` file or a directory. Directory mode generates every direct `.proto` child and does not recurse. The output directory is created when necessary.
187
+
188
+ | Flag | Effect |
189
+ | --- | --- |
190
+ | `--only-types` | Passes `onlyTypes=true` to `ts-proto`. |
191
+ | `--use-date` | Uses `Date` for `google.protobuf.Timestamp`; the default is `useDate=false`. |
192
+ | `--use-map-type` | Uses ES `Map` for protobuf maps; the default is `useMapType=false`. |
193
+
194
+ Generation always enables `esModuleInterop` and disables generated service clients because SRPC uses the message codecs directly. The command uses `PROTOC` when set, then the package's `protoc` binary, then a `protoc` executable on `PATH`. It resolves `ts-proto` from the app or TSF package.
195
+
196
+ ## Compiler Installation
197
+
198
+ `tsf-install` prepares an app for TSF's reflected metadata compiler. It:
199
+
200
+ - adds itself to `postinstall` without replacing an existing postinstall command
201
+ - moves the supported `typescript` and `ttsc` versions into `devDependencies`
202
+ - keeps TSF/compiler versions aligned in other packages in the same workspace when those dependencies are present
203
+ - finds `tsconfig*.json` files outside generated/dependency directories
204
+ - adds the TSF transform to `compilerOptions.plugins`
205
+ - sets top-level `reflection: true`
206
+ - avoids duplicating the plugin in configs that extend an already configured local base config
207
+
208
+ When compiler dependencies change outside a package-manager lifecycle, it detects Yarn, npm, pnpm, or Bun and refreshes the install/lockfile. During `postinstall`, it reports that another install is needed instead of recursively starting the package manager.
209
+
210
+ The generated app registers `tsf-install` as `postinstall`, so normal dependency installation keeps compiler setup aligned. See [Getting Started: TypeScript Configuration](./getting-started.md#typescript-configuration) for the resulting config.
211
+
212
+ ## Update Command
213
+
214
+ `tsf-update` is included as a reserved compatibility binary but does not currently modify the project. Dependency updates should be performed through the package manager, followed by `tsf-install` when compiler configuration must be refreshed.
@@ -0,0 +1,191 @@
1
+ # Configuration
2
+
3
+ Configuration is loaded by reflecting a config class. `createApp()` defaults to `BaseAppConfig`, but apps usually extend it.
4
+
5
+ ```ts
6
+ import { BaseAppConfig, Env } from '@zyno-io/ts-server-foundation';
7
+
8
+ class AppConfig extends BaseAppConfig {
9
+ STRIPE_KEY_SECRET!: string;
10
+ MAX_UPLOAD_BYTES = 10_000_000;
11
+ }
12
+
13
+ Env.APP_ENV = 'test';
14
+ ```
15
+
16
+ ## Loading Order
17
+
18
+ `ConfigLoader` creates the config class, applies `defaultConfig`, then loads env files and `Env` through `@zyno-io/config`.
19
+
20
+ Loaded string values receive configuration-specific primitive coercion for reflected numbers, booleans, and matching literals. The completed config instance is then reflected-validated, so required fields, unions, constraints, custom validators, and invalid numeric values such as `NaN` fail application startup. Configuration loading does not run the general reflected deserializer registry: transforms such as `TrimmedString` and phone normalization are not applied automatically.
21
+
22
+ Env files are read from the process cwd:
23
+
24
+ 1. `.env`
25
+ 2. `.env.local`
26
+ 3. `.env.development` and `.env.development.local` in test mode
27
+ 4. `.env.${APP_ENV}`
28
+ 5. `.env.${APP_ENV}.local`
29
+
30
+ Values from `Env` override file values.
31
+
32
+ Keys ending in `_SECRET` may contain encrypted `@zyno-io/config` payloads. They are decrypted while loading when `CONFIG_DECRYPTION_SECRET` is set; `CONFIG_DECRYPTION_KEY` is also supported as a fallback for older deployments. Encrypted `_SECRET` values from process env are decrypted the same way.
33
+
34
+ ## Env Behavior
35
+
36
+ `Env` is the only runtime bridge to `process.env`. It is preloaded from `process.env`, typed as optional strings, and exported from the package root.
37
+
38
+ Config loading reads from `Env` without deleting consumed keys from `process.env`. Values loaded into the typed config object remain available to later code and child processes.
39
+
40
+ ## Required Environment
41
+
42
+ `APP_ENV` is required only when `NODE_ENV=production`. The loader infers `APP_ENV=test` under Node's test runner and otherwise defaults to `development` outside production.
43
+
44
+ ## Built-In Configuration And Environment Surface
45
+
46
+ `BaseAppConfig` owns the reflected application settings used during `createApp()`. Some observability keys below are read directly from `Env` by the early telemetry bootstrap instead, so they do not need to be declared on `BaseAppConfig` unless an application wants to load them through a custom config class.
47
+
48
+ ### Application
49
+
50
+ | Variable | Type | Default | Description |
51
+ | ---------------------------------------- | --------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
52
+ | `APP_ENV` | `string` | test/development inferred; required in production | Application environment. |
53
+ | `DEVCONSOLE_ENABLED` | `boolean` | enabled in development | Enable or disable `/_devconsole` independently of `APP_ENV`. |
54
+ | `PORT` | `number` | `3000` | HTTP server port. Ignored in `APP_ENV=test` unless `frameworkConfig.port` or `serverConfig.port` is provided. |
55
+ | `USE_REAL_IP_HEADER` | `boolean` | unset | Trust proxy remote-address headers. |
56
+ | `HTTP_MAX_REQUEST_BODY_BYTES` | `number` | `104857600` | Maximum decoded request body bytes. |
57
+ | `HTTP_MAX_REQUEST_COMPRESSED_BODY_BYTES` | `number` | `26214400` | Maximum compressed request body bytes before gzip decoding. |
58
+
59
+ ### Database
60
+
61
+ | Variable | Type | Default | Description |
62
+ | ------------------------ | ----------------------- | ------- | ---------------------------------------------------------------- |
63
+ | `DB_ADAPTER` | `'mysql' \| 'postgres'` | unset | Dialect used by shared `createDatabase(config, entities)` calls. |
64
+ | `TSF_TEST_DATABASE_NAME` | `string` | unset | Internal test database override used by `TestingFacade`. |
65
+
66
+ ### MySQL
67
+
68
+ | Variable | Type | Default |
69
+ | ---------------------------- | -------- | --------------------------------- |
70
+ | `MYSQL_HOST` | `string` | unset |
71
+ | `MYSQL_PORT` | `number` | unset |
72
+ | `MYSQL_USER` | `string` | unset |
73
+ | `MYSQL_PASSWORD_SECRET` | `string` | unset |
74
+ | `MYSQL_DATABASE` | `string` | unset |
75
+ | `MYSQL_CONNECTION_LIMIT` | `number` | 10 production, 5 development/test |
76
+ | `MYSQL_MIN_IDLE_CONNECTIONS` | `number` | unset |
77
+ | `MYSQL_IDLE_TIMEOUT_SECONDS` | `number` | 60 production, 5 development/test |
78
+
79
+ ### PostgreSQL
80
+
81
+ | Variable | Type | Default |
82
+ | ---------------------------- | --------- | --------------------------------- |
83
+ | `PG_HOST` | `string` | unset |
84
+ | `PG_PORT` | `number` | unset |
85
+ | `PG_USER` | `string` | unset |
86
+ | `PG_PASSWORD_SECRET` | `string` | unset |
87
+ | `PG_DATABASE` | `string` | unset |
88
+ | `PG_SCHEMA` | `string` | unset |
89
+ | `PG_SSL` | `boolean` | unset |
90
+ | `PG_SSL_REJECT_UNAUTHORIZED` | `boolean` | unset |
91
+ | `PG_CONNECTION_LIMIT` | `number` | 10 production, 5 development/test |
92
+ | `PG_IDLE_TIMEOUT_SECONDS` | `number` | 60 production, 5 development/test |
93
+
94
+ ### Authentication
95
+
96
+ | Variable | Type | Default |
97
+ | -------------------------- | --------- | ---------------------- |
98
+ | `AUTH_JWT_ISSUER` | `string` | unset |
99
+ | `AUTH_JWT_EXPIRATION_MINS` | `number` | runtime fallback `60` |
100
+ | `AUTH_JWT_COOKIE_NAME` | `string` | runtime fallback `jwt` |
101
+ | `AUTH_JWT_SECRET` | `string` | unset |
102
+ | `AUTH_JWT_SECRET_B64` | `string` | unset |
103
+ | `AUTH_JWT_ED_SECRET` | `string` | unset |
104
+ | `AUTH_JWT_ENABLE_VERIFY` | `boolean` | `true` |
105
+ | `AUTH_BASIC_SECRET` | `string` | unset |
106
+
107
+ ### Crypto
108
+
109
+ | Variable | Type | Default |
110
+ | ------------------ | -------- | ------- |
111
+ | `CRYPTO_SECRET` | `string` | unset |
112
+ | `CRYPTO_IV_LENGTH` | `number` | `12` |
113
+
114
+ ### Redis And Workers
115
+
116
+ | Variable | Type | Default |
117
+ | --------------------- | -------------------- | ----------------------- |
118
+ | `REDIS_SENTINEL_HOST` | `string` | unset |
119
+ | `REDIS_SENTINEL_PORT` | `number` | unset |
120
+ | `REDIS_SENTINEL_NAME` | `string` | unset |
121
+ | `REDIS_HOST` | `string` | unset |
122
+ | `REDIS_PORT` | `number` | unset |
123
+ | `REDIS_PREFIX` | `string` | package name |
124
+ | `CACHE_REDIS_*` | `string`/`number` | falls back to `REDIS_*` |
125
+ | `MUTEX_REDIS_*` | `string`/`number` | falls back to `REDIS_*` |
126
+ | `BROADCAST_REDIS_*` | `string`/`number` | falls back to `REDIS_*` |
127
+ | `MESH_REDIS_*` | `string`/`number` | falls back to `REDIS_*` |
128
+ | `BULL_REDIS_*` | `string`/`number` | falls back to `REDIS_*` |
129
+ | `BULL_QUEUE` | `string` | `default` |
130
+ | `MUTEX_MODE` | `'local' \| 'redis'` | `local` |
131
+ | `ENABLE_JOB_RUNNER` | `boolean` | unset |
132
+ | `TEST_KEEP_DB` | `string` | unset |
133
+ | `TEST_RUN_TS` | `string` | unset |
134
+
135
+ ### Observability
136
+
137
+ | Variable | Type | Default |
138
+ | ------------------------------------- | --------- | ------- |
139
+ | `SENTRY_DSN` | `string` | unset |
140
+ | `OTEL_EXPORTER_OTLP_ENDPOINT` | `string` | unset |
141
+ | `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | `string` | unset |
142
+ | `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | `string` | unset |
143
+ | `OTEL_METRICS_ENDPOINT_ENABLED` | `boolean` | unset |
144
+ | `OTEL_DEBUG` | `boolean` | unset |
145
+ | `OTEL_SDK_DISABLED` | `boolean` | unset |
146
+ | `ALERTS_SLACK_WEBHOOK_URL` | `string` | unset |
147
+
148
+ ### SRPC
149
+
150
+ | Variable | Type | Default |
151
+ | -------------------------- | -------- | ------- |
152
+ | `SRPC_AUTH_SECRET` | `string` | unset |
153
+ | `SRPC_AUTH_CLOCK_DRIFT_MS` | `number` | `30000` |
154
+
155
+ ### HTTP And OpenAPI
156
+
157
+ | Variable | Type | Default | Description |
158
+ | -------------------------------- | ----------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------- |
159
+ | `HTTP_REQUEST_LOGGING_MODE` | `'none' \| 'e2e' \| 'finish' \| 'errors'` | `errors` in test, `e2e` otherwise | Controls request start, finish, and error logs. |
160
+ | `HEALTHZ_ENABLE_REQUEST_LOGGING` | `boolean` | `false` | Includes `/healthz` in normal request logging. |
161
+ | `ENABLE_OPENAPI_SCHEMA` | `boolean` | development outside Node tests | Writes `openapi.yaml` after startup; legacy route fallback when the route flag is unset. |
162
+ | `ENABLE_OPENAPI_ROUTE` | `boolean` | enabled in development/test | Serves `/openapi.json` and `/openapi.yaml`; takes precedence over the schema flag. |
163
+ | `ENABLE_PINO_PRETTY` | `boolean` | enabled in development/test | Enables pretty log output. |
164
+ | `ENABLE_PINO_SINGLE_LINE` | `boolean` | enabled in development/test | Keeps pretty log entries on one line. |
165
+ | `LOG_LEVEL` | `string` | `debug` outside production, `info` in production | Sets the `pino-pretty` output filter; JSON logging is not filtered by this key. |
166
+
167
+ ### Mail
168
+
169
+ | Variable | Type | Default |
170
+ | ---------------------- | ---------------------- | ----------- |
171
+ | `MAIL_FROM` | `string` | unset |
172
+ | `MAIL_FROM_NAME` | `string` | unset |
173
+ | `MAIL_PROVIDER` | `'smtp' \| 'postmark'` | `smtp` |
174
+ | `SMTP_HOST` | `string` | `127.0.0.1` |
175
+ | `SMTP_PORT` | `number` | `1025` |
176
+ | `SMTP_USER` | `string` | unset |
177
+ | `SMTP_PASSWORD_SECRET` | `string` | unset |
178
+ | `SMTP_TLS` | `boolean` | `false` |
179
+ | `POSTMARK_SECRET` | `string` | unset |
180
+
181
+ ## `isDevFeatureEnabled`
182
+
183
+ ```ts
184
+ import { isDevFeatureEnabled } from '@zyno-io/ts-server-foundation';
185
+
186
+ if (isDevFeatureEnabled(config.ENABLE_OPENAPI_SCHEMA)) {
187
+ // enabled
188
+ }
189
+ ```
190
+
191
+ `'1'` and `'true'` enable a flag. `'0'` and `'false'` disable a flag. Undefined flags default to enabled in development/test and disabled in production unless a different default is passed.