@fecommunity/reactpress-server 4.0.0-beta.9 → 4.0.1

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 (334) hide show
  1. package/README.md +327 -45
  2. package/bin/reactpress-server.js +6 -14
  3. package/dist/app.module.js +27 -15
  4. package/dist/app.module.js.map +1 -1
  5. package/dist/filters/http-exception.filter.js +1 -1
  6. package/dist/filters/http-exception.filter.js.map +1 -1
  7. package/dist/generate-swagger.d.ts +1 -1
  8. package/dist/generate-swagger.js +11 -12
  9. package/dist/generate-swagger.js.map +1 -1
  10. package/dist/interceptors/transform.interceptor.d.ts +6 -2
  11. package/dist/interceptors/transform.interceptor.js +5 -10
  12. package/dist/interceptors/transform.interceptor.js.map +1 -1
  13. package/dist/logger/index.js +4 -5
  14. package/dist/logger/index.js.map +1 -1
  15. package/dist/main.d.ts +1 -1
  16. package/dist/main.js +23 -45
  17. package/dist/main.js.map +1 -1
  18. package/dist/modules/article/article.controller.d.ts +2 -7
  19. package/dist/modules/article/article.controller.js +48 -103
  20. package/dist/modules/article/article.controller.js.map +1 -1
  21. package/dist/modules/article/article.entity.d.ts +0 -4
  22. package/dist/modules/article/article.entity.js +41 -61
  23. package/dist/modules/article/article.entity.js.map +1 -1
  24. package/dist/modules/article/article.module.js +3 -18
  25. package/dist/modules/article/article.module.js.map +1 -1
  26. package/dist/modules/article/article.service.d.ts +2 -16
  27. package/dist/modules/article/article.service.js +29 -151
  28. package/dist/modules/article/article.service.js.map +1 -1
  29. package/dist/modules/auth/auth.controller.js +11 -11
  30. package/dist/modules/auth/auth.controller.js.map +1 -1
  31. package/dist/modules/auth/auth.module.js +4 -4
  32. package/dist/modules/auth/auth.module.js.map +1 -1
  33. package/dist/modules/auth/auth.service.js +7 -8
  34. package/dist/modules/auth/auth.service.js.map +1 -1
  35. package/dist/modules/auth/jwt-auth.guard.js +3 -4
  36. package/dist/modules/auth/jwt-auth.guard.js.map +1 -1
  37. package/dist/modules/auth/jwt.strategy.js +3 -4
  38. package/dist/modules/auth/jwt.strategy.js.map +1 -1
  39. package/dist/modules/auth/roles.guard.js +2 -2
  40. package/dist/modules/auth/roles.guard.js.map +1 -1
  41. package/dist/modules/category/category.controller.js +20 -21
  42. package/dist/modules/category/category.controller.js.map +1 -1
  43. package/dist/modules/category/category.entity.js +13 -13
  44. package/dist/modules/category/category.entity.js.map +1 -1
  45. package/dist/modules/category/category.module.js +1 -1
  46. package/dist/modules/category/category.module.js.map +1 -1
  47. package/dist/modules/category/category.service.js +4 -5
  48. package/dist/modules/category/category.service.js.map +1 -1
  49. package/dist/modules/comment/comment.controller.js +20 -24
  50. package/dist/modules/comment/comment.controller.js.map +1 -1
  51. package/dist/modules/comment/comment.entity.js +31 -31
  52. package/dist/modules/comment/comment.entity.js.map +1 -1
  53. package/dist/modules/comment/comment.module.js +2 -11
  54. package/dist/modules/comment/comment.module.js.map +1 -1
  55. package/dist/modules/comment/comment.service.d.ts +1 -5
  56. package/dist/modules/comment/comment.service.js +16 -43
  57. package/dist/modules/comment/comment.service.js.map +1 -1
  58. package/dist/modules/comment/html.d.ts +1 -1
  59. package/dist/modules/comment/html.js +3 -3
  60. package/dist/modules/comment/html.js.map +1 -1
  61. package/dist/modules/file/file.controller.d.ts +1 -1
  62. package/dist/modules/file/file.controller.js +20 -22
  63. package/dist/modules/file/file.controller.js.map +1 -1
  64. package/dist/modules/file/file.entity.d.ts +0 -7
  65. package/dist/modules/file/file.entity.js +15 -20
  66. package/dist/modules/file/file.entity.js.map +1 -1
  67. package/dist/modules/file/file.module.js +4 -16
  68. package/dist/modules/file/file.module.js.map +1 -1
  69. package/dist/modules/file/file.service.d.ts +1 -5
  70. package/dist/modules/file/file.service.js +24 -70
  71. package/dist/modules/file/file.service.js.map +1 -1
  72. package/dist/modules/install/install.controller.js +5 -5
  73. package/dist/modules/install/install.controller.js.map +1 -1
  74. package/dist/modules/install/install.module.js +1 -1
  75. package/dist/modules/install/install.module.js.map +1 -1
  76. package/dist/modules/install/install.service.js +2 -2
  77. package/dist/modules/install/install.service.js.map +1 -1
  78. package/dist/modules/knowledge/knowledge.controller.js +33 -35
  79. package/dist/modules/knowledge/knowledge.controller.js.map +1 -1
  80. package/dist/modules/knowledge/knowledge.entity.js +33 -33
  81. package/dist/modules/knowledge/knowledge.entity.js.map +1 -1
  82. package/dist/modules/knowledge/knowledge.module.js +1 -1
  83. package/dist/modules/knowledge/knowledge.module.js.map +1 -1
  84. package/dist/modules/knowledge/knowledge.service.js +11 -12
  85. package/dist/modules/knowledge/knowledge.service.js.map +1 -1
  86. package/dist/modules/page/page.controller.js +23 -24
  87. package/dist/modules/page/page.controller.js.map +1 -1
  88. package/dist/modules/page/page.entity.js +27 -27
  89. package/dist/modules/page/page.entity.js.map +1 -1
  90. package/dist/modules/page/page.module.js +1 -1
  91. package/dist/modules/page/page.module.js.map +1 -1
  92. package/dist/modules/page/page.service.js +12 -12
  93. package/dist/modules/page/page.service.js.map +1 -1
  94. package/dist/modules/search/search.controller.js +12 -12
  95. package/dist/modules/search/search.controller.js.map +1 -1
  96. package/dist/modules/search/search.entity.js +13 -13
  97. package/dist/modules/search/search.entity.js.map +1 -1
  98. package/dist/modules/search/search.module.js +1 -1
  99. package/dist/modules/search/search.module.js.map +1 -1
  100. package/dist/modules/search/search.service.js +2 -2
  101. package/dist/modules/search/search.service.js.map +1 -1
  102. package/dist/modules/setting/setting.constant.d.ts +4 -5
  103. package/dist/modules/setting/setting.constant.js +20 -5
  104. package/dist/modules/setting/setting.constant.js.map +1 -1
  105. package/dist/modules/setting/setting.controller.js +11 -11
  106. package/dist/modules/setting/setting.controller.js.map +1 -1
  107. package/dist/modules/setting/setting.entity.d.ts +0 -3
  108. package/dist/modules/setting/setting.entity.js +49 -64
  109. package/dist/modules/setting/setting.entity.js.map +1 -1
  110. package/dist/modules/setting/setting.module.js +2 -2
  111. package/dist/modules/setting/setting.module.js.map +1 -1
  112. package/dist/modules/setting/setting.service.d.ts +2 -13
  113. package/dist/modules/setting/setting.service.js +24 -169
  114. package/dist/modules/setting/setting.service.js.map +1 -1
  115. package/dist/modules/smtp/mail.util.d.ts +6 -7
  116. package/dist/modules/smtp/mail.util.js +9 -5
  117. package/dist/modules/smtp/mail.util.js.map +1 -1
  118. package/dist/modules/smtp/smtp.controller.d.ts +0 -3
  119. package/dist/modules/smtp/smtp.controller.js +14 -27
  120. package/dist/modules/smtp/smtp.controller.js.map +1 -1
  121. package/dist/modules/smtp/smtp.entity.js +15 -15
  122. package/dist/modules/smtp/smtp.entity.js.map +1 -1
  123. package/dist/modules/smtp/smtp.module.js +2 -2
  124. package/dist/modules/smtp/smtp.module.js.map +1 -1
  125. package/dist/modules/smtp/smtp.service.d.ts +0 -14
  126. package/dist/modules/smtp/smtp.service.js +12 -40
  127. package/dist/modules/smtp/smtp.service.js.map +1 -1
  128. package/dist/modules/tag/tag.controller.js +22 -24
  129. package/dist/modules/tag/tag.controller.js.map +1 -1
  130. package/dist/modules/tag/tag.entity.js +12 -12
  131. package/dist/modules/tag/tag.entity.js.map +1 -1
  132. package/dist/modules/tag/tag.module.js +1 -1
  133. package/dist/modules/tag/tag.module.js.map +1 -1
  134. package/dist/modules/tag/tag.service.js +4 -5
  135. package/dist/modules/tag/tag.service.js.map +1 -1
  136. package/dist/modules/user/user.controller.js +28 -39
  137. package/dist/modules/user/user.controller.js.map +1 -1
  138. package/dist/modules/user/user.entity.js +22 -22
  139. package/dist/modules/user/user.entity.js.map +1 -1
  140. package/dist/modules/user/user.module.js +2 -2
  141. package/dist/modules/user/user.module.js.map +1 -1
  142. package/dist/modules/user/user.service.js +12 -16
  143. package/dist/modules/user/user.service.js.map +1 -1
  144. package/dist/modules/view/view.controller.js +19 -20
  145. package/dist/modules/view/view.controller.js.map +1 -1
  146. package/dist/modules/view/view.entity.js +24 -24
  147. package/dist/modules/view/view.entity.js.map +1 -1
  148. package/dist/modules/view/view.module.js +1 -1
  149. package/dist/modules/view/view.module.js.map +1 -1
  150. package/dist/modules/view/view.service.js +4 -4
  151. package/dist/modules/view/view.service.js.map +1 -1
  152. package/dist/public/favicon.png +0 -0
  153. package/dist/starter.d.ts +1 -3
  154. package/dist/starter.js +14 -202
  155. package/dist/starter.js.map +1 -1
  156. package/dist/tsconfig.build.tsbuildinfo +15957 -1
  157. package/dist/utils/date.util.js +1 -1
  158. package/dist/utils/date.util.js.map +1 -1
  159. package/dist/utils/markdown.util.js +1 -1
  160. package/dist/utils/markdown.util.js.map +1 -1
  161. package/dist/utils/oss/aliyun-oss-client.d.ts +1 -3
  162. package/dist/utils/oss/aliyun-oss-client.js +0 -5
  163. package/dist/utils/oss/aliyun-oss-client.js.map +1 -1
  164. package/dist/utils/oss/oss-client.d.ts +1 -3
  165. package/dist/utils/oss/oss-client.js.map +1 -1
  166. package/dist/utils/oss.util.d.ts +1 -3
  167. package/dist/utils/oss.util.js +1 -6
  168. package/dist/utils/oss.util.js.map +1 -1
  169. package/dist/utils/uniqueid.util.js +1 -1
  170. package/dist/utils/uniqueid.util.js.map +1 -1
  171. package/dist/utils/upload.util.d.ts +2 -6
  172. package/dist/utils/upload.util.js +8 -23
  173. package/dist/utils/upload.util.js.map +1 -1
  174. package/dist/utils/user.util.d.ts +0 -1
  175. package/dist/utils/user.util.js +2 -6
  176. package/dist/utils/user.util.js.map +1 -1
  177. package/package.json +28 -21
  178. package/public/favicon.png +0 -0
  179. package/dist/common/api-messages.d.ts +0 -41
  180. package/dist/common/api-messages.js +0 -45
  181. package/dist/common/api-messages.js.map +0 -1
  182. package/dist/database/typeorm-options.d.ts +0 -3
  183. package/dist/database/typeorm-options.js +0 -60
  184. package/dist/database/typeorm-options.js.map +0 -1
  185. package/dist/modules/api-key/api-key.controller.d.ts +0 -14
  186. package/dist/modules/api-key/api-key.controller.js +0 -63
  187. package/dist/modules/api-key/api-key.controller.js.map +0 -1
  188. package/dist/modules/api-key/api-key.entity.d.ts +0 -11
  189. package/dist/modules/api-key/api-key.entity.js +0 -63
  190. package/dist/modules/api-key/api-key.entity.js.map +0 -1
  191. package/dist/modules/api-key/api-key.guard.d.ts +0 -7
  192. package/dist/modules/api-key/api-key.guard.js +0 -39
  193. package/dist/modules/api-key/api-key.guard.js.map +0 -1
  194. package/dist/modules/api-key/api-key.module.d.ts +0 -2
  195. package/dist/modules/api-key/api-key.module.js +0 -28
  196. package/dist/modules/api-key/api-key.module.js.map +0 -1
  197. package/dist/modules/api-key/api-key.service.d.ts +0 -15
  198. package/dist/modules/api-key/api-key.service.js +0 -81
  199. package/dist/modules/api-key/api-key.service.js.map +0 -1
  200. package/dist/modules/article/article-revision.entity.d.ts +0 -11
  201. package/dist/modules/article/article-revision.entity.js +0 -53
  202. package/dist/modules/article/article-revision.entity.js.map +0 -1
  203. package/dist/modules/article/article-slug.util.d.ts +0 -2
  204. package/dist/modules/article/article-slug.util.js +0 -19
  205. package/dist/modules/article/article-slug.util.js.map +0 -1
  206. package/dist/modules/article/scheduled-publish.service.d.ts +0 -13
  207. package/dist/modules/article/scheduled-publish.service.js +0 -65
  208. package/dist/modules/article/scheduled-publish.service.js.map +0 -1
  209. package/dist/modules/bootstrap/bootstrap.constants.d.ts +0 -20
  210. package/dist/modules/bootstrap/bootstrap.constants.js +0 -171
  211. package/dist/modules/bootstrap/bootstrap.constants.js.map +0 -1
  212. package/dist/modules/bootstrap/bootstrap.service.d.ts +0 -22
  213. package/dist/modules/bootstrap/bootstrap.service.js +0 -183
  214. package/dist/modules/bootstrap/bootstrap.service.js.map +0 -1
  215. package/dist/modules/bootstrap/install-locale.d.ts +0 -2
  216. package/dist/modules/bootstrap/install-locale.js +0 -11
  217. package/dist/modules/bootstrap/install-locale.js.map +0 -1
  218. package/dist/modules/extension/extension.module.d.ts +0 -9
  219. package/dist/modules/extension/extension.module.js +0 -50
  220. package/dist/modules/extension/extension.module.js.map +0 -1
  221. package/dist/modules/extension/plugin-loader.service.d.ts +0 -12
  222. package/dist/modules/extension/plugin-loader.service.js +0 -96
  223. package/dist/modules/extension/plugin-loader.service.js.map +0 -1
  224. package/dist/modules/extension/plugin-registry.bridge.d.ts +0 -3
  225. package/dist/modules/extension/plugin-registry.bridge.js +0 -44
  226. package/dist/modules/extension/plugin-registry.bridge.js.map +0 -1
  227. package/dist/modules/extension/plugin.controller.d.ts +0 -22
  228. package/dist/modules/extension/plugin.controller.js +0 -155
  229. package/dist/modules/extension/plugin.controller.js.map +0 -1
  230. package/dist/modules/extension/plugin.service.d.ts +0 -52
  231. package/dist/modules/extension/plugin.service.js +0 -391
  232. package/dist/modules/extension/plugin.service.js.map +0 -1
  233. package/dist/modules/extension/preview-draft.store.d.ts +0 -13
  234. package/dist/modules/extension/preview-draft.store.js +0 -41
  235. package/dist/modules/extension/preview-draft.store.js.map +0 -1
  236. package/dist/modules/extension/theme-registry.bridge.d.ts +0 -56
  237. package/dist/modules/extension/theme-registry.bridge.js +0 -46
  238. package/dist/modules/extension/theme-registry.bridge.js.map +0 -1
  239. package/dist/modules/extension/theme.controller.d.ts +0 -66
  240. package/dist/modules/extension/theme.controller.js +0 -301
  241. package/dist/modules/extension/theme.controller.js.map +0 -1
  242. package/dist/modules/extension/theme.service.d.ts +0 -140
  243. package/dist/modules/extension/theme.service.js +0 -1039
  244. package/dist/modules/extension/theme.service.js.map +0 -1
  245. package/dist/modules/file/file-optimization.controller.d.ts +0 -12
  246. package/dist/modules/file/file-optimization.controller.js +0 -79
  247. package/dist/modules/file/file-optimization.controller.js.map +0 -1
  248. package/dist/modules/file/file-optimization.service.d.ts +0 -36
  249. package/dist/modules/file/file-optimization.service.js +0 -385
  250. package/dist/modules/file/file-optimization.service.js.map +0 -1
  251. package/dist/modules/file/file-optimization.types.d.ts +0 -66
  252. package/dist/modules/file/file-optimization.types.js +0 -5
  253. package/dist/modules/file/file-optimization.types.js.map +0 -1
  254. package/dist/modules/file/image-optimizer-plugin.guard.d.ts +0 -7
  255. package/dist/modules/file/image-optimizer-plugin.guard.js +0 -33
  256. package/dist/modules/file/image-optimizer-plugin.guard.js.map +0 -1
  257. package/dist/modules/health/health.controller.d.ts +0 -11
  258. package/dist/modules/health/health.controller.js +0 -55
  259. package/dist/modules/health/health.controller.js.map +0 -1
  260. package/dist/modules/health/health.module.d.ts +0 -2
  261. package/dist/modules/health/health.module.js +0 -20
  262. package/dist/modules/health/health.module.js.map +0 -1
  263. package/dist/modules/hook/hook.module.d.ts +0 -2
  264. package/dist/modules/hook/hook.module.js +0 -22
  265. package/dist/modules/hook/hook.module.js.map +0 -1
  266. package/dist/modules/hook/hook.service.d.ts +0 -26
  267. package/dist/modules/hook/hook.service.js +0 -105
  268. package/dist/modules/hook/hook.service.js.map +0 -1
  269. package/dist/modules/webhook/webhook.controller.d.ts +0 -12
  270. package/dist/modules/webhook/webhook.controller.js +0 -63
  271. package/dist/modules/webhook/webhook.controller.js.map +0 -1
  272. package/dist/modules/webhook/webhook.entity.d.ts +0 -9
  273. package/dist/modules/webhook/webhook.entity.js +0 -54
  274. package/dist/modules/webhook/webhook.entity.js.map +0 -1
  275. package/dist/modules/webhook/webhook.module.d.ts +0 -2
  276. package/dist/modules/webhook/webhook.module.js +0 -27
  277. package/dist/modules/webhook/webhook.module.js.map +0 -1
  278. package/dist/modules/webhook/webhook.service.d.ts +0 -16
  279. package/dist/modules/webhook/webhook.service.js +0 -100
  280. package/dist/modules/webhook/webhook.service.js.map +0 -1
  281. package/dist/node-polyfills.d.ts +0 -18
  282. package/dist/node-polyfills.js +0 -24
  283. package/dist/node-polyfills.js.map +0 -1
  284. package/dist/public/apple-touch-icon.png +0 -0
  285. package/dist/public/favicon-16.png +0 -0
  286. package/dist/public/favicon-32.png +0 -0
  287. package/dist/public/favicon-48.png +0 -0
  288. package/dist/public/favicon.ico +0 -0
  289. package/dist/public/icon-192.png +0 -0
  290. package/dist/public/icon-512.png +0 -0
  291. package/dist/public/logo-200.png +0 -0
  292. package/dist/public/logo-400.png +0 -0
  293. package/dist/public/logo.png +0 -0
  294. package/dist/public/logo.svg +0 -7
  295. package/dist/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  296. package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  297. package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  298. package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  299. package/dist/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
  300. package/dist/tsconfig.tsbuildinfo +0 -1
  301. package/dist/utils/html-sanitize.util.d.ts +0 -1
  302. package/dist/utils/html-sanitize.util.js +0 -33
  303. package/dist/utils/html-sanitize.util.js.map +0 -1
  304. package/dist/utils/image-processor.util.d.ts +0 -23
  305. package/dist/utils/image-processor.util.js +0 -88
  306. package/dist/utils/image-processor.util.js.map +0 -1
  307. package/dist/utils/local-api-quiet.util.d.ts +0 -1
  308. package/dist/utils/local-api-quiet.util.js +0 -8
  309. package/dist/utils/local-api-quiet.util.js.map +0 -1
  310. package/dist/utils/project-root.util.d.ts +0 -2
  311. package/dist/utils/project-root.util.js +0 -42
  312. package/dist/utils/project-root.util.js.map +0 -1
  313. package/dist/utils/query-whitelist.util.d.ts +0 -1
  314. package/dist/utils/query-whitelist.util.js +0 -100
  315. package/dist/utils/query-whitelist.util.js.map +0 -1
  316. package/dist/utils/theme-placeholder-cover.d.ts +0 -8
  317. package/dist/utils/theme-placeholder-cover.js +0 -94
  318. package/dist/utils/theme-placeholder-cover.js.map +0 -1
  319. package/public/apple-touch-icon.png +0 -0
  320. package/public/favicon-16.png +0 -0
  321. package/public/favicon-32.png +0 -0
  322. package/public/favicon-48.png +0 -0
  323. package/public/favicon.ico +0 -0
  324. package/public/icon-192.png +0 -0
  325. package/public/icon-512.png +0 -0
  326. package/public/logo-200.png +0 -0
  327. package/public/logo-400.png +0 -0
  328. package/public/logo.png +0 -0
  329. package/public/logo.svg +0 -7
  330. package/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  331. package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  332. package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  333. package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  334. package/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
package/README.md CHANGED
@@ -1,92 +1,374 @@
1
- # @fecommunity/reactpress-server
1
+ > **Official hubs** (package name unchanged)
2
+ >
3
+ > - Site / docs: https://www.reactpress.cc/
4
+ > - Source: https://github.com/reactpressjs/reactpress
5
+ >
6
+ > Install: `npm i -g @fecommunity/reactpress`
2
7
 
3
- NestJS CMS API for **ReactPress 4.0** — articles, pages, media, users, plugins, themes, and site settings. Headless REST with Swagger; powers themes, Admin, and desktop via [@fecommunity/reactpress-toolkit](../toolkit/).
8
+ # @fecommunity/reactpress-server
4
9
 
5
- > **MySQL** for production ¡ **SQLite** for desktop / local mode.
10
+ ReactPress Server - Enterprise-grade NestJS 10 backend API for ReactPress CMS with WordPress-style 5-minute installation.
6
11
 
7
12
  [![NPM Version](https://img.shields.io/npm/v/@fecommunity/reactpress-server.svg)](https://www.npmjs.com/package/@fecommunity/reactpress-server)
8
13
  [![License](https://img.shields.io/npm/l/@fecommunity/reactpress-server.svg)](https://github.com/fecommunity/reactpress/blob/master/server/LICENSE)
14
+ [![Node Version](https://img.shields.io/node/v/@fecommunity/reactpress-server.svg)](https://nodejs.org)
15
+ [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
9
16
  [![NestJS](https://img.shields.io/badge/NestJS-10-red)](https://nestjs.com/)
10
17
 
11
- ## Quick start
18
+ ## Overview
19
+
20
+ ReactPress Server is an enterprise-grade, production-ready backend API built with NestJS 10 that powers the ReactPress CMS platform. It provides a comprehensive set of RESTful APIs for content management, user authentication, media handling, and more. With its WordPress-style 5-minute installation, it offers an incredibly smooth setup experience.
21
+
22
+ The server is built with a modular architecture following NestJS best practices, making it highly extensible and maintainable. It automatically generates OpenAPI/Swagger documentation that powers the [ReactPress Toolkit](../toolkit), ensuring seamless frontend-backend integration.
23
+
24
+ ## Quick Start
25
+
26
+ ### Installation & Setup
12
27
 
13
28
  ```bash
29
+ # Regular startup
14
30
  npx @fecommunity/reactpress-server
15
- # production with PM2
31
+
32
+ # PM2 startup for production
16
33
  npx @fecommunity/reactpress-server --pm2
17
34
  ```
18
35
 
19
- On first run, the install wizard opens in your browser, creates configuration, and starts the API at `http://localhost:3002` (Swagger: `/api`).
36
+ That's it! The command will automatically:
37
+
38
+ 1. **Auto-detect** if configuration exists
39
+ 2. **Launch installation wizard** in your browser if no configuration found
40
+ 3. **Start the server** immediately after installation
41
+ 4. **Open API documentation** at `http://localhost:3002/api`
20
42
 
21
- ## Features
43
+ ## Enterprise Features
22
44
 
23
- - REST API for content, media, comments, search, and site settings
24
- - Plugin hook runtime and theme catalog integration (ReactPress 4.0)
25
- - JWT auth, rate limiting, validation, and Swagger documentation
26
- - MySQL (default) or SQLite (desktop / local mode)
27
- - PM2 support for production
45
+ - 🚀 **Zero-Command Installation** - No complex CLI parameters needed
46
+ - 🌍 **WordPress-Style Setup** - Familiar 5-minute installation process
47
+ - 🔧 **Auto-Configuration** - Generates `.env` files automatically
48
+ - 🔌 **Database Auto-Provisioning** - Creates MySQL database with migrations
49
+ - đŸŽ¯ **Seamless Flow** - From installation to running server in minutes
50
+ - 📖 **Auto-Documentation** - Swagger API docs available immediately
51
+ - ⚡ **PM2 Support** - Optional PM2 process management for production
52
+ - 🔐 **Enterprise Security** - JWT with refresh token rotation, rate limiting
53
+ - đŸ›Ąī¸ **Advanced Security** - Helmet.js, CSRF protection, input validation
54
+ - 📱 **Responsive APIs** - Mobile-friendly RESTful endpoints
55
+ - 🌐 **Globalization** - Multi-language support with RTL
56
+ - 📊 **Analytics Tracking** - Built-in view and visitor analytics
57
+ - 🔄 **Data Synchronization** - Scheduled tasks and webhook support
28
58
 
29
59
  ## Requirements
30
60
 
31
- - Node.js >= 20
32
- - MySQL 8.0+ (production) or SQLite (local/desktop)
33
- - npm or pnpm
61
+ - Node.js >= 18.20.4
62
+ - MySQL 8.0+ or PostgreSQL 13+
63
+ - npm or pnpm package manager
64
+
65
+ ## Usage Scenarios
66
+
67
+ ### Standalone API Server
68
+ Perfect for:
69
+ - Headless CMS implementation
70
+ - Mobile app backend
71
+ - Microservices architecture
72
+ - Custom frontend integration
73
+ - Enterprise API gateway
74
+
75
+ ### Full ReactPress Stack
76
+ Use with ReactPress client for complete CMS solution:
77
+ ```bash
78
+ # Start server
79
+ npx @fecommunity/reactpress-server
80
+
81
+ # In another terminal, start client
82
+ npx @fecommunity/reactpress-client
83
+ ```
84
+
85
+ ## API Modules
86
+
87
+ ReactPress Server provides comprehensive enterprise API modules:
88
+
89
+ - **Article Management** - Create, read, update, delete articles with versioning
90
+ - **User Authentication** - Registration, login, password management, 2FA
91
+ - **Comment System** - Comment moderation and management with spam detection
92
+ - **Media Management** - File upload and management (local/S3/Cloudinary)
93
+ - **Category & Tag** - Content organization systems with hierarchy
94
+ - **Page Management** - Custom page creation with templates
95
+ - **Settings** - System configuration management with environment overrides
96
+ - **SMTP** - Email sending capabilities with template system
97
+ - **Search** - Full-text search functionality with Elasticsearch integration
98
+ - **Analytics** - Visitor and view tracking with export capabilities
99
+ - **Webhooks** - Event-driven integrations with external services
100
+ - **Scheduled Tasks** - Cron jobs for automated operations
101
+
102
+ ## PM2 Support
103
+
104
+ ReactPress server supports PM2 process management for production deployments:
105
+
106
+ ```bash
107
+ # Start with PM2
108
+ npx @fecommunity/reactpress-server --pm2
109
+ ```
110
+
111
+ PM2 features:
112
+ - Automatic process restart on crash
113
+ - Memory monitoring and alerts
114
+ - Log management with rotation
115
+ - Cluster mode support for horizontal scaling
116
+ - Process monitoring dashboard with health checks
117
+
118
+ ## Configuration
119
+
120
+ The installation wizard will create a `.env` file with:
121
+
122
+ ```env
123
+ # Database Configuration (Production)
124
+ DB_HOST=prod-db.cluster-xyz.amazonaws.com
125
+ DB_PORT=3306
126
+ DB_USER=reactpress_user
127
+ DB_PASSWD=secure_password_here
128
+ DB_DATABASE=reactpress_prod
129
+ DB_SSL=true
130
+
131
+ # Site URLs (Production)
132
+ CLIENT_SITE_URL=https://yourdomain.com
133
+ SERVER_SITE_URL=https://api.yourdomain.com
134
+
135
+ # Security Settings (Production)
136
+ JWT_SECRET=your-very-secure-jwt-secret-here
137
+ JWT_EXPIRES_IN=24h
138
+ JWT_REFRESH_EXPIRES_IN=7d
139
+
140
+ # SMTP Configuration (Production)
141
+ SMTP_HOST=email-smtp.us-east-1.amazonaws.com
142
+ SMTP_PORT=587
143
+ SMTP_USER=your_smtp_username
144
+ SMTP_PASS=your_smtp_password
145
+ SMTP_FROM=noreply@yourdomain.com
146
+
147
+ # Cloud Storage (Optional)
148
+ S3_ACCESS_KEY_ID=your_aws_access_key
149
+ S3_SECRET_ACCESS_KEY=your_aws_secret_key
150
+ S3_BUCKET_NAME=your_bucket_name
151
+ S3_REGION=us-east-1
152
+ ```
153
+
154
+ ## API Documentation
155
+
156
+ Once running, visit `http://localhost:3002/api` for:
157
+ - Interactive Swagger documentation
158
+ - API endpoint explorer
159
+ - Authentication examples
160
+ - Response schemas
161
+ - Request/response validation
162
+ - Code generation for multiple languages
34
163
 
35
164
  ## Development
36
165
 
37
166
  ```bash
167
+ # Clone repository
38
168
  git clone https://github.com/fecommunity/reactpress.git
39
- cd reactpress
169
+ cd reactpress/server
170
+
171
+ # Install dependencies
40
172
  pnpm install
41
- pnpm run --dir server dev
42
- ```
43
173
 
44
- | Command | Description |
45
- | :--- | :--- |
46
- | `pnpm run dev` | Dev server with hot reload |
47
- | `pnpm run build` | Production build |
48
- | `pnpm run test` | Unit tests |
49
- | `pnpm run pm2:start` | Start with PM2 |
174
+ # Start development server with hot reload
175
+ pnpm run dev
176
+
177
+ # Start with PM2 (development)
178
+ pnpm run pm2:start
179
+
180
+ # Build for production
181
+ pnpm run build
182
+
183
+ # Run tests
184
+ pnpm run test
185
+
186
+ # Run tests with coverage
187
+ pnpm run test:cov
188
+
189
+ # Run end-to-end tests
190
+ pnpm run test:e2e
191
+ ```
50
192
 
51
- ## Project structure
193
+ ## Project Structure
52
194
 
53
195
  ```
54
196
  server/
55
- ├── src/modules/ # Feature modules (article, auth, plugin, theme, â€Ļ)
56
- ├── src/common/ # Shared utilities
57
- ├── public/ # Static assets and Swagger UI
58
- └── bin/ # CLI entry points
197
+ ├── src/
198
+ │ ├── modules/ # Feature modules
199
+ │ │ ├── article/ # Article management
200
+ │ │ ├── auth/ # Authentication
201
+ │ │ ├── user/ # User management
202
+ │ │ └── ... # Other modules
203
+ │ ├── common/ # Shared utilities and decorators
204
+ │ ├── filters/ # Exception filters
205
+ │ ├── interceptors/ # Request/response interceptors
206
+ │ ├── guards/ # Authentication guards
207
+ │ ├── pipes/ # Data transformation pipes
208
+ │ ├── logger/ # Logging utilities
209
+ │ └── utils/ # Utility functions
210
+ ├── public/ # Static assets
211
+ │ └── swagger/ # Swagger documentation
212
+ ├── dist/ # Compiled output
213
+ └── bin/ # CLI entry points
59
214
  ```
60
215
 
61
- ## Configuration
62
-
63
- The install wizard generates `.env`. Key variables:
216
+ ## Environment Variables
64
217
 
65
218
  | Variable | Description | Default |
66
- | :--- | :--- | :--- |
219
+ |----------|-------------|---------|
67
220
  | `DB_HOST` | Database host | `127.0.0.1` |
68
221
  | `DB_PORT` | Database port | `3306` |
222
+ | `DB_USER` | Database username | - |
223
+ | `DB_PASSWD` | Database password | - |
69
224
  | `DB_DATABASE` | Database name | `reactpress` |
70
- | `SERVER_PORT` | API port | `3002` |
71
- | `JWT_SECRET` | JWT signing key | — |
72
- | `CLIENT_SITE_URL` | Public site URL | `http://localhost:3001` |
225
+ | `SERVER_PORT` | Server port | `3002` |
226
+ | `JWT_SECRET` | JWT secret key | - |
227
+ | `CLIENT_SITE_URL` | Client site URL | `http://localhost:3001` |
228
+ | `SERVER_SITE_URL` | Server site URL | `http://localhost:3002` |
229
+ | `SMTP_HOST` | SMTP server host | - |
230
+ | `SMTP_PORT` | SMTP server port | - |
231
+ | `SMTP_USER` | SMTP username | - |
232
+ | `SMTP_PASS` | SMTP password | - |
233
+
234
+ ## CLI Commands
235
+
236
+ ```bash
237
+ # Show help
238
+ npx @fecommunity/reactpress-server --help
239
+
240
+ # Start server
241
+ npx @fecommunity/reactpress-server
242
+
243
+ # Start with PM2
244
+ npx @fecommunity/reactpress-server --pm2
245
+
246
+ # Specify port
247
+ npx @fecommunity/reactpress-server --port 3002
248
+
249
+ # Enable verbose logging
250
+ npx @fecommunity/reactpress-server --verbose
73
251
 
74
- ## Integration
252
+ # Run database migrations
253
+ npx @fecommunity/reactpress-server --migrate
254
+
255
+ # Seed database with sample data
256
+ npx @fecommunity/reactpress-server --seed
257
+ ```
258
+
259
+ ## Integration with ReactPress Toolkit
260
+
261
+ The server automatically generates the OpenAPI specification that powers the ReactPress Toolkit:
75
262
 
76
263
  ```typescript
77
- import { api } from '@fecommunity/reactpress-toolkit';
264
+ // The toolkit is automatically generated from this server's API
265
+ import { api, types } from '@fecommunity/reactpress-toolkit';
78
266
 
79
- const articles = await api.article.findAll();
267
+ // All API endpoints are strongly typed
268
+ const articles: types.IArticle[] = await api.article.findAll();
80
269
  ```
81
270
 
82
- OpenAPI spec from this server drives toolkit code generation (`pnpm run --dir toolkit generate`).
271
+ ## Database Schema
272
+
273
+ ReactPress uses MySQL/PostgreSQL with the following key tables:
274
+ - `users` - User accounts and profiles with 2FA support
275
+ - `articles` - Blog posts and content with versioning
276
+ - `categories` - Content categorization with hierarchy
277
+ - `tags` - Content tagging system
278
+ - `comments` - Reader comments and discussions with moderation
279
+ - `files` - Media file management with cloud storage
280
+ - `settings` - System configuration with environment overrides
281
+ - `views` - Analytics and tracking
282
+ - `webhooks` - Event-driven integrations
283
+ - `scheduled_tasks` - Automated operations
284
+
285
+ ## Security Features
83
286
 
84
- ## Docs & support
287
+ - **JWT Authentication** - Secure token-based authentication with refresh rotation
288
+ - **Rate Limiting** - Adaptive throttling to prevent abuse
289
+ - **Input Validation** - Sanitize all user inputs with Zod schema validation
290
+ - **Helmet.js** - Secure HTTP headers
291
+ - **CSRF Protection** - Prevent cross-site request forgery
292
+ - **SQL Injection Prevention** - Through TypeORM parameterized queries
293
+ - **CORS Configuration** - Controlled cross-origin resource sharing
294
+ - **Data Encryption** - At-rest encryption for sensitive data
295
+ - **Audit Logging** - Comprehensive activity tracking
296
+
297
+ ## Performance Optimization
298
+
299
+ - **Database Indexing** - Optimized queries with proper indexing
300
+ - **Connection Pooling** - Efficient database connection management
301
+ - **Caching** - Redis integration for frequently accessed data
302
+ - **Compression** - Gzip compression for API responses
303
+ - **Pagination** - Efficient data retrieval for large datasets
304
+ - **Query Optimization** - TypeORM query builder for complex operations
305
+ - **Background Jobs** - Queue system for long-running tasks
306
+
307
+ ## Testing
308
+
309
+ ```bash
310
+ # Run unit tests
311
+ pnpm run test
85
312
 
86
- - [Documentation](https://reactpress-docs.vercel.app/)
87
- - [Issues](https://github.com/fecommunity/reactpress/issues)
88
- - [Contributing](../CONTRIBUTING.md)
313
+ # Run integration tests
314
+ pnpm run test:integration
315
+
316
+ # Run end-to-end tests
317
+ pnpm run test:e2e
318
+
319
+ # Run tests with coverage
320
+ pnpm run test:cov
321
+
322
+ # Run linting
323
+ pnpm run lint
324
+
325
+ # Run formatting
326
+ pnpm run format
327
+
328
+ # Run type checking
329
+ pnpm run type-check
330
+ ```
331
+
332
+ ## Deployment
333
+
334
+ ### Production Deployment with PM2
335
+
336
+ ```
337
+ # Start server with PM2
338
+ npx @fecommunity/reactpress-server --pm2
339
+
340
+ # Or build and start manually
341
+ pnpm run build
342
+ pnpm run start:prod
343
+ ```
344
+
345
+ ## Monitoring & Logging
346
+
347
+ - **Structured Logging** - JSON-formatted logs for easy parsing
348
+ - **Error Tracking** - Comprehensive error reporting with context
349
+ - **Performance Metrics** - Response time and throughput monitoring
350
+ - **Health Checks** - API endpoint for service status
351
+ - **Alerting** - Integration with monitoring systems (Prometheus, Grafana)
352
+
353
+ ## Support
354
+
355
+ - 📖 [Documentation](https://github.com/fecommunity/reactpress)
356
+ - 🐛 [Issues](https://github.com/fecommunity/reactpress/issues)
357
+ - đŸ’Ŧ [Discussions](https://github.com/fecommunity/reactpress/discussions)
358
+ - 📧 [Enterprise Support](mailto:enterprise@reactpress.dev)
359
+
360
+ ## Contributing
361
+
362
+ 1. Fork the repository
363
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
364
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
365
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
366
+ 5. Open a pull request
89
367
 
90
368
  ## License
91
369
 
92
- MIT — see [LICENSE](LICENSE).
370
+ MIT License - see [LICENSE](LICENSE) file for details.
371
+
372
+ ---
373
+
374
+ Built with â¤ī¸ by [FECommunity](https://github.com/fecommunity)
@@ -26,16 +26,16 @@ if (showHelp) {
26
26
  ReactPress Server - NestJS-based backend API for ReactPress CMS
27
27
 
28
28
  Usage:
29
- reactpress-server [options]
30
- (é€šå¸¸į”ą reactpress-cli start č°ƒį”¨)
29
+ npx @fecommunity/reactpress-server [options]
31
30
 
32
31
  Options:
33
32
  --pm2 Start server with PM2 process manager
34
33
  --help, -h Show this help message
35
34
 
36
35
  Examples:
37
- node bin/reactpress-server.js # Start server normally
38
- node bin/reactpress-server.js --pm2 # Start server with PM2
36
+ npx @fecommunity/reactpress-server # Start server normally
37
+ npx @fecommunity/reactpress-server --pm2 # Start server with PM2
38
+ npx @fecommunity/reactpress-server --help # Show this help message
39
39
  `);
40
40
  process.exit(0);
41
41
  }
@@ -186,17 +186,9 @@ function startWithNode() {
186
186
  // Set environment variables
187
187
  process.env.NODE_ENV = process.env.NODE_ENV || 'production';
188
188
 
189
- // Import and run the server (require() alone does not invoke main — see dist/main.js)
189
+ // Import and run the server
190
190
  try {
191
- const mainModule = require(distPath);
192
- if (typeof mainModule.main !== 'function') {
193
- console.error('[ReactPress Server] Server entry does not export main()');
194
- process.exit(1);
195
- }
196
- mainModule.main().catch((error) => {
197
- console.error('[ReactPress Server] Failed to start server:', error);
198
- process.exit(1);
199
- });
191
+ require(distPath);
200
192
  } catch (error) {
201
193
  console.error('[ReactPress Server] Failed to start server:', error);
202
194
  process.exit(1);
@@ -7,39 +7,56 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.AppModule = void 0;
10
- const reactpress_toolkit_1 = require("../../toolkit/dist");
10
+ const reactpress_config_1 = require("@fecommunity/reactpress-config");
11
11
  const common_1 = require("@nestjs/common");
12
12
  const config_1 = require("@nestjs/config");
13
13
  const typeorm_1 = require("@nestjs/typeorm");
14
- const typeorm_options_1 = require("./database/typeorm-options");
15
- const api_key_module_1 = require("./modules/api-key/api-key.module");
14
+ const article_entity_1 = require("./modules/article/article.entity");
16
15
  const article_module_1 = require("./modules/article/article.module");
17
16
  const auth_module_1 = require("./modules/auth/auth.module");
17
+ const category_entity_1 = require("./modules/category/category.entity");
18
18
  const category_module_1 = require("./modules/category/category.module");
19
+ const comment_entity_1 = require("./modules/comment/comment.entity");
19
20
  const comment_module_1 = require("./modules/comment/comment.module");
20
- const extension_module_1 = require("./modules/extension/extension.module");
21
+ const file_entity_1 = require("./modules/file/file.entity");
21
22
  const file_module_1 = require("./modules/file/file.module");
22
- const health_module_1 = require("./modules/health/health.module");
23
- const hook_module_1 = require("./modules/hook/hook.module");
23
+ const knowledge_entity_1 = require("./modules/knowledge/knowledge.entity");
24
24
  const knowledge_module_1 = require("./modules/knowledge/knowledge.module");
25
+ const page_entity_1 = require("./modules/page/page.entity");
25
26
  const page_module_1 = require("./modules/page/page.module");
27
+ const search_entity_1 = require("./modules/search/search.entity");
26
28
  const search_module_1 = require("./modules/search/search.module");
29
+ const setting_entity_1 = require("./modules/setting/setting.entity");
27
30
  const setting_module_1 = require("./modules/setting/setting.module");
31
+ const smtp_entity_1 = require("./modules/smtp/smtp.entity");
28
32
  const smtp_module_1 = require("./modules/smtp/smtp.module");
33
+ const tag_entity_1 = require("./modules/tag/tag.entity");
29
34
  const tag_module_1 = require("./modules/tag/tag.module");
35
+ const user_entity_1 = require("./modules/user/user.entity");
30
36
  const user_module_1 = require("./modules/user/user.module");
37
+ const view_entity_1 = require("./modules/view/view.entity");
31
38
  const view_module_1 = require("./modules/view/view.module");
32
- const webhook_module_1 = require("./modules/webhook/webhook.module");
33
39
  let AppModule = class AppModule {
34
40
  };
35
41
  AppModule = __decorate([
36
- (0, common_1.Module)({
42
+ common_1.Module({
37
43
  imports: [
38
- config_1.ConfigModule.forRoot({ isGlobal: true, envFilePath: [reactpress_toolkit_1.config.file] }),
44
+ config_1.ConfigModule.forRoot({ isGlobal: true, envFilePath: [reactpress_config_1.file] }),
39
45
  typeorm_1.TypeOrmModule.forRootAsync({
40
46
  imports: [config_1.ConfigModule],
41
47
  inject: [config_1.ConfigService],
42
- useFactory: async (configService) => (0, typeorm_options_1.createTypeOrmOptions)(configService),
48
+ useFactory: async (configService) => ({
49
+ type: 'mysql',
50
+ entities: [user_entity_1.User, file_entity_1.File, knowledge_entity_1.Knowledge, article_entity_1.Article, category_entity_1.Category, tag_entity_1.Tag, comment_entity_1.Comment, setting_entity_1.Setting, smtp_entity_1.SMTP, page_entity_1.Page, view_entity_1.View, search_entity_1.Search],
51
+ host: configService.get('DB_HOST', '0.0.0.0'),
52
+ port: configService.get('DB_PORT', 3306),
53
+ username: configService.get('DB_USER', 'root'),
54
+ password: configService.get('DB_PASSWD', 'root'),
55
+ database: configService.get('DB_DATABASE', 'reactpress'),
56
+ charset: 'utf8mb4',
57
+ timezone: '+08:00',
58
+ synchronize: true,
59
+ }),
43
60
  }),
44
61
  user_module_1.UserModule,
45
62
  file_module_1.FileModule,
@@ -54,11 +71,6 @@ AppModule = __decorate([
54
71
  page_module_1.PageModule,
55
72
  view_module_1.ViewModule,
56
73
  search_module_1.SearchModule,
57
- health_module_1.HealthModule,
58
- hook_module_1.HookModule,
59
- api_key_module_1.ApiKeyModule,
60
- webhook_module_1.WebhookModule,
61
- extension_module_1.ExtensionModule,
62
74
  ],
63
75
  controllers: [],
64
76
  providers: [],
@@ -1 +1 @@
1
- {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,2DAAyD;AACzD,2CAAwC;AACxC,2CAA6D;AAC7D,6CAAgD;AAEhD,gEAAkE;AAClE,qEAAgE;AAEhE,qEAAiE;AAEjE,4DAAwD;AAExD,wEAAoE;AAEpE,qEAAiE;AACjE,2EAAuE;AAEvE,4DAAwD;AACxD,kEAA8D;AAC9D,4DAAwD;AAExD,2EAAuE;AAEvE,4DAAwD;AAExD,kEAA8D;AAE9D,qEAAiE;AAEjE,4DAAwD;AAExD,yDAAqD;AAErD,4DAAwD;AAExD,4DAAwD;AACxD,qEAAiE;AAgC1D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,SAAS;IA9BrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,qBAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,2BAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YACpE,uBAAa,CAAC,YAAY,CAAC;gBACzB,OAAO,EAAE,CAAC,qBAAY,CAAC;gBACvB,MAAM,EAAE,CAAC,sBAAa,CAAC;gBACvB,UAAU,EAAE,KAAK,EAAE,aAA4B,EAAE,EAAE,CAAC,IAAA,sCAAoB,EAAC,aAAa,CAAC;aACxF,CAAC;YACF,wBAAU;YACV,wBAAU;YACV,sBAAS;YACT,8BAAa;YACb,kCAAe;YACf,gCAAc;YACd,8BAAa;YACb,8BAAa;YACb,wBAAU;YACV,wBAAU;YACV,wBAAU;YACV,wBAAU;YACV,4BAAY;YACZ,4BAAY;YACZ,wBA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ACrG,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC;oBAC7C,IAAI,EAAE,aAAa,CAAC,GAAG,CAAS,SAAS,EAAE,IAAI,CAAC;oBAChD,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;oBAC9C,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC;oBAChD,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,aAAa,EAAE,YAAY,CAAC;oBACxD,OAAO,EAAE,SAAS;oBAClB,QAAQ,EAAE,QAAQ;oBAClB,WAAW,EAAE,IAAI;iBAClB,CAAC;aACH,CAAC;YACF,wBAAU;YACV,wBAAU;YACV,sBAAS;YACT,8BAAa;YACb,kCAAe;YACf,gCAAc;YACd,8BAAa;YACb,8BAAa;YACb,wBAAU;YACV,wBAAU;YACV,wBAAU;YACV,wBAAU;YACV,4BAAY;SACb;QACD,WAAW,EAAE,EAAE;QACf,SAAS,EAAE,EAAE;KACd,CAAC;GACW,SAAS,CAAG;AAAZ,8BAAS"}
@@ -30,7 +30,7 @@ let HttpExceptionFilter = class HttpExceptionFilter {
30
30
  }
31
31
  };
32
32
  HttpExceptionFilter = __decorate([
33
- (0, common_1.Catch)(common_1.HttpException)
33
+ common_1.Catch(common_1.HttpException)
34
34
  ], HttpExceptionFilter);
35
35
  exports.HttpExceptionFilter = HttpExceptionFilter;
36
36
  //# sourceMappingURL=http-exception.filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-exception.filter.js","sourceRoot":"","sources":["../../src/filters/http-exception.filter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAkG;AAElG,sCAAwC;AAGjC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,KAAK,CAAC,SAAwB,EAAE,IAAmB;QACjD,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,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AAM,MAAM,GAAG,SAAS,YAAY,sBAAa,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,mBAAU,CAAC,qBAAqB,CAAC;QAC7G,MAAM,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC;QAC3D,MAAM,aAAa,GAAG;YACpB,UAAU,EAAE,MAAM;YAClB,GAAG;YACH,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,IAAI;SACX,CAAC;QAGF,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxB,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,iCAAiC,CAAC,CAAC;QACnE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC7B,oBAAW,CAAC,KAAK,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACxC,CAAC;CACF,CAAA;AAtBY,mBAAmB;IAD/B,cAAK,CAAC,sBAAa,CAAC;GACR,mBAAmB,CAsB/B;AAtBY,kDAAmB"}
@@ -1 +1 @@
1
- import './node-polyfills';
1
+ export {};
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- require("./node-polyfills");
4
3
  const core_1 = require("@nestjs/core");
5
4
  const swagger_1 = require("@nestjs/swagger");
6
5
  const fs_1 = require("fs");
@@ -26,26 +25,26 @@ async function generateSwaggerJson() {
26
25
  .build();
27
26
  console.log('🔨 Generating Swagger document...');
28
27
  const document = swagger_1.SwaggerModule.createDocument(app, swaggerConfig);
29
- const outputPath = (0, path_1.join)(__dirname, '../public/swagger.json');
30
- const publicDir = (0, path_1.join)(__dirname, '../public');
31
- if (!(0, fs_1.existsSync)(publicDir)) {
28
+ const outputPath = path_1.join(__dirname, '../public/swagger.json');
29
+ const publicDir = path_1.join(__dirname, '../public');
30
+ if (!fs_1.existsSync(publicDir)) {
32
31
  console.log('📁 Creating public directory...');
33
32
  require('fs').mkdirSync(publicDir, { recursive: true });
34
33
  }
35
- if ((0, fs_1.existsSync)(outputPath)) {
34
+ if (fs_1.existsSync(outputPath)) {
36
35
  console.log('đŸ—‘ī¸ Removing existing swagger.json file...');
37
- (0, fs_1.unlinkSync)(outputPath);
36
+ fs_1.unlinkSync(outputPath);
38
37
  }
39
38
  console.log('💾 Writing Swagger JSON to file...');
40
- (0, fs_1.writeFileSync)(outputPath, JSON.stringify(document, null, 2));
39
+ fs_1.writeFileSync(outputPath, JSON.stringify(document, null, 2));
41
40
  console.log(`✅ Success! Swagger JSON generated at: ${outputPath}`);
42
41
  console.log('🎉 Swagger generation process completed successfully');
43
42
  process.exit(0);
44
43
  }
45
44
  catch (error) {
46
45
  console.error('❌ Error during Swagger generation:', error.message);
47
- const existingPath = (0, path_1.join)(__dirname, '../public/swagger.json');
48
- if ((0, fs_1.existsSync)(existingPath)) {
46
+ const existingPath = path_1.join(__dirname, '../public/swagger.json');
47
+ if (fs_1.existsSync(existingPath)) {
49
48
  console.log('â„šī¸ Using existing swagger.json file');
50
49
  console.log('🎉 Swagger generation process completed successfully');
51
50
  process.exit(0);
@@ -58,10 +57,10 @@ async function generateSwaggerJson() {
58
57
  finally {
59
58
  }
60
59
  }
61
- generateSwaggerJson().catch((e) => {
60
+ generateSwaggerJson().catch(e => {
62
61
  console.error('đŸ’Ĩ Unhandled error in generateSwaggerJson:', e.message);
63
- const existingPath = (0, path_1.join)(__dirname, '../public/swagger.json');
64
- if ((0, fs_1.existsSync)(existingPath)) {
62
+ const existingPath = path_1.join(__dirname, '../public/swagger.json');
63
+ if (fs_1.existsSync(existingPath)) {
65
64
  console.log('â„šī¸ Using existing swagger.json file');
66
65
  console.log('🎉 Swagger generation process completed successfully');
67
66
  process.exit(0);
@@ -1 +1 @@
1
- {"version":3,"file":"generate-swagger.js","sourceRoot":"","sources":["../src/generate-swagger.ts"],"names":[],"mappings":";;AAAA,4BAA0B;AAC1B,uCAA2C;AAC3C,6CAAiE;AACjE,2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EAAE,wBAAwB,CAAC,CAAC;QAC/D,IAAI,eAAU,CAAC,YAAY,CAAC,EAAE;YAC5B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;YACnD,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;YACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;YACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;KACF;YAAS;KAGT;AACH,CAAC;AAGD,mBAAmB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IAC9B,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IAGvE,MAAM,YAAY,GAAG,WAAI,CAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC;IAC/D,IAAI,eAAU,CAAC,YAAY,CAAC,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;SAAM;QACL,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
2
2
  import { Observable } from 'rxjs';
3
- export declare class TransformInterceptor implements NestInterceptor {
4
- intercept(context: ExecutionContext, next: CallHandler): Observable<unknown>;
3
+ interface Response<T> {
4
+ data: T;
5
5
  }
6
+ export declare class TransformInterceptor<T> implements NestInterceptor<T, Response<T>> {
7
+ intercept(context: ExecutionContext, next: CallHandler<T>): Observable<Response<T>>;
8
+ }
9
+ export {};