@fecommunity/reactpress-server 4.0.0 → 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 (340) hide show
  1. package/README.md +325 -56
  2. package/bin/reactpress-server.js +6 -50
  3. package/dist/app.module.js +30 -18
  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 -3
  16. package/dist/main.js +23 -47
  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 -6
  70. package/dist/modules/file/file.service.js +38 -88
  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 +14 -18
  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 +32 -36
  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 -71
  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 -52
  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 -54
  231. package/dist/modules/extension/plugin.service.js +0 -414
  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 -68
  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/content-image-scan.util.d.ts +0 -52
  246. package/dist/modules/file/content-image-scan.util.js +0 -222
  247. package/dist/modules/file/content-image-scan.util.js.map +0 -1
  248. package/dist/modules/file/file-optimization.controller.d.ts +0 -12
  249. package/dist/modules/file/file-optimization.controller.js +0 -79
  250. package/dist/modules/file/file-optimization.controller.js.map +0 -1
  251. package/dist/modules/file/file-optimization.service.d.ts +0 -36
  252. package/dist/modules/file/file-optimization.service.js +0 -387
  253. package/dist/modules/file/file-optimization.service.js.map +0 -1
  254. package/dist/modules/file/file-optimization.types.d.ts +0 -66
  255. package/dist/modules/file/file-optimization.types.js +0 -5
  256. package/dist/modules/file/file-optimization.types.js.map +0 -1
  257. package/dist/modules/file/image-optimizer-plugin.guard.d.ts +0 -7
  258. package/dist/modules/file/image-optimizer-plugin.guard.js +0 -33
  259. package/dist/modules/file/image-optimizer-plugin.guard.js.map +0 -1
  260. package/dist/modules/health/health.controller.d.ts +0 -11
  261. package/dist/modules/health/health.controller.js +0 -55
  262. package/dist/modules/health/health.controller.js.map +0 -1
  263. package/dist/modules/health/health.module.d.ts +0 -2
  264. package/dist/modules/health/health.module.js +0 -20
  265. package/dist/modules/health/health.module.js.map +0 -1
  266. package/dist/modules/hook/hook.module.d.ts +0 -2
  267. package/dist/modules/hook/hook.module.js +0 -22
  268. package/dist/modules/hook/hook.module.js.map +0 -1
  269. package/dist/modules/hook/hook.service.d.ts +0 -26
  270. package/dist/modules/hook/hook.service.js +0 -105
  271. package/dist/modules/hook/hook.service.js.map +0 -1
  272. package/dist/modules/webhook/webhook.controller.d.ts +0 -12
  273. package/dist/modules/webhook/webhook.controller.js +0 -63
  274. package/dist/modules/webhook/webhook.controller.js.map +0 -1
  275. package/dist/modules/webhook/webhook.entity.d.ts +0 -9
  276. package/dist/modules/webhook/webhook.entity.js +0 -54
  277. package/dist/modules/webhook/webhook.entity.js.map +0 -1
  278. package/dist/modules/webhook/webhook.module.d.ts +0 -2
  279. package/dist/modules/webhook/webhook.module.js +0 -27
  280. package/dist/modules/webhook/webhook.module.js.map +0 -1
  281. package/dist/modules/webhook/webhook.service.d.ts +0 -16
  282. package/dist/modules/webhook/webhook.service.js +0 -100
  283. package/dist/modules/webhook/webhook.service.js.map +0 -1
  284. package/dist/node-polyfills.d.ts +0 -18
  285. package/dist/node-polyfills.js +0 -24
  286. package/dist/node-polyfills.js.map +0 -1
  287. package/dist/public/apple-touch-icon.png +0 -0
  288. package/dist/public/favicon-16.png +0 -0
  289. package/dist/public/favicon-32.png +0 -0
  290. package/dist/public/favicon-48.png +0 -0
  291. package/dist/public/favicon.ico +0 -0
  292. package/dist/public/icon-192.png +0 -0
  293. package/dist/public/icon-512.png +0 -0
  294. package/dist/public/logo-200.png +0 -0
  295. package/dist/public/logo-400.png +0 -0
  296. package/dist/public/logo.png +0 -0
  297. package/dist/public/logo.svg +0 -7
  298. package/dist/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  299. package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  300. package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  301. package/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  302. package/dist/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
  303. package/dist/tsconfig.tsbuildinfo +0 -1
  304. package/dist/utils/html-sanitize.util.d.ts +0 -1
  305. package/dist/utils/html-sanitize.util.js +0 -33
  306. package/dist/utils/html-sanitize.util.js.map +0 -1
  307. package/dist/utils/image-processor.util.d.ts +0 -23
  308. package/dist/utils/image-processor.util.js +0 -88
  309. package/dist/utils/image-processor.util.js.map +0 -1
  310. package/dist/utils/local-api-quiet.util.d.ts +0 -1
  311. package/dist/utils/local-api-quiet.util.js +0 -8
  312. package/dist/utils/local-api-quiet.util.js.map +0 -1
  313. package/dist/utils/project-root.util.d.ts +0 -2
  314. package/dist/utils/project-root.util.js +0 -42
  315. package/dist/utils/project-root.util.js.map +0 -1
  316. package/dist/utils/query-whitelist.util.d.ts +0 -1
  317. package/dist/utils/query-whitelist.util.js +0 -100
  318. package/dist/utils/query-whitelist.util.js.map +0 -1
  319. package/dist/utils/theme-placeholder-cover.d.ts +0 -7
  320. package/dist/utils/theme-placeholder-cover.js +0 -94
  321. package/dist/utils/theme-placeholder-cover.js.map +0 -1
  322. package/dist/utils/upload-url.util.d.ts +0 -4
  323. package/dist/utils/upload-url.util.js +0 -34
  324. package/dist/utils/upload-url.util.js.map +0 -1
  325. package/public/apple-touch-icon.png +0 -0
  326. package/public/favicon-16.png +0 -0
  327. package/public/favicon-32.png +0 -0
  328. package/public/favicon-48.png +0 -0
  329. package/public/favicon.ico +0 -0
  330. package/public/icon-192.png +0 -0
  331. package/public/icon-512.png +0 -0
  332. package/public/logo-200.png +0 -0
  333. package/public/logo-400.png +0 -0
  334. package/public/logo.png +0 -0
  335. package/public/logo.svg +0 -7
  336. package/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  337. package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  338. package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  339. package/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  340. package/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
package/README.md CHANGED
@@ -1,105 +1,374 @@
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`
7
+
1
8
  # @fecommunity/reactpress-server
2
9
 
3
- > **ReactPress headless REST API — NestJS backend for the publishing platform.**
10
+ ReactPress Server - Enterprise-grade NestJS 10 backend API for ReactPress CMS with WordPress-style 5-minute installation.
4
11
 
5
- [![npm version](https://img.shields.io/npm/v/@fecommunity/reactpress-server/beta.svg?label=beta)](https://www.npmjs.com/package/@fecommunity/reactpress-server/v/beta)
6
- [![npm latest](https://img.shields.io/npm/v/@fecommunity/reactpress-server.svg?label=latest)](https://www.npmjs.com/package/@fecommunity/reactpress-server)
7
- [![License: MIT](https://img.shields.io/npm/l/@fecommunity/reactpress-server.svg)](https://github.com/fecommunity/reactpress/blob/master/server/LICENSE)
12
+ [![NPM Version](https://img.shields.io/npm/v/@fecommunity/reactpress-server.svg)](https://www.npmjs.com/package/@fecommunity/reactpress-server)
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/)
16
+ [![NestJS](https://img.shields.io/badge/NestJS-10-red)](https://nestjs.com/)
8
17
 
9
- > **Deprecated** — from ReactPress 3.1 onward, the API ships inside [`@fecommunity/reactpress`](https://www.npmjs.com/package/@fecommunity/reactpress) (CLI). New projects should run `npx @fecommunity/reactpress init` instead of installing this package standalone.
18
+ ## Overview
10
19
 
11
- This package remains available for legacy deployments and direct API integration. It powers themes, Admin, and desktop clients through [@fecommunity/reactpress-toolkit](../toolkit/).
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.
12
21
 
13
- | Capability | Detail |
14
- | :----------- | :----- |
15
- | **Content** | Articles, pages, media, comments, search, site settings |
16
- | **Extensibility** | Plugin hook runtime and theme catalog (ReactPress 4.0) |
17
- | **API** | Headless REST with JWT auth, rate limiting, Swagger/OpenAPI |
18
- | **Database** | MySQL (production) or SQLite (local / desktop) |
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.
19
23
 
20
- [Documentation](https://docs.gaoredu.com/) · [Migrate to CLI](../cli/) · [GitHub](https://github.com/fecommunity/reactpress)
24
+ ## Quick Start
21
25
 
22
- ## Quick start
26
+ ### Installation & Setup
23
27
 
24
28
  ```bash
29
+ # Regular startup
25
30
  npx @fecommunity/reactpress-server
26
- # production with PM2
31
+
32
+ # PM2 startup for production
27
33
  npx @fecommunity/reactpress-server --pm2
28
34
  ```
29
35
 
30
- 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`
31
42
 
32
- ## Features
43
+ ## Enterprise Features
33
44
 
34
- - REST API for content, media, comments, search, and site settings
35
- - Plugin hook runtime and theme catalog integration (ReactPress 4.0)
36
- - JWT auth, rate limiting, validation, and Swagger documentation
37
- - MySQL (default) or SQLite (desktop / local mode)
38
- - 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
39
58
 
40
59
  ## Requirements
41
60
 
42
- - Node.js >= 20
43
- - MySQL 8.0+ (production) or SQLite (local/desktop)
44
- - 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
45
163
 
46
164
  ## Development
47
165
 
48
166
  ```bash
167
+ # Clone repository
49
168
  git clone https://github.com/fecommunity/reactpress.git
50
- cd reactpress
169
+ cd reactpress/server
170
+
171
+ # Install dependencies
51
172
  pnpm install
52
- pnpm run --dir server dev
53
- ```
54
173
 
55
- | Command | Description |
56
- | :------ | :---------- |
57
- | `pnpm run dev` | Dev server with hot reload |
58
- | `pnpm run build` | Production build |
59
- | `pnpm run test` | Unit tests |
60
- | `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
61
185
 
62
- ## Project structure
186
+ # Run tests with coverage
187
+ pnpm run test:cov
188
+
189
+ # Run end-to-end tests
190
+ pnpm run test:e2e
191
+ ```
192
+
193
+ ## Project Structure
63
194
 
64
195
  ```
65
196
  server/
66
- ├── src/modules/ # Feature modules (article, auth, plugin, theme, …)
67
- ├── src/common/ # Shared utilities
68
- ├── public/ # Static assets and Swagger UI
69
- └── 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
70
214
  ```
71
215
 
72
- ## Configuration
73
-
74
- The install wizard generates `.env`. Key variables:
216
+ ## Environment Variables
75
217
 
76
218
  | Variable | Description | Default |
77
- | :------- | :---------- | :------ |
219
+ |----------|-------------|---------|
78
220
  | `DB_HOST` | Database host | `127.0.0.1` |
79
221
  | `DB_PORT` | Database port | `3306` |
222
+ | `DB_USER` | Database username | - |
223
+ | `DB_PASSWD` | Database password | - |
80
224
  | `DB_DATABASE` | Database name | `reactpress` |
81
- | `SERVER_PORT` | API port | `3002` |
82
- | `JWT_SECRET` | JWT signing key | — |
83
- | `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 | - |
84
233
 
85
- ## Integration
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
251
+
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:
86
262
 
87
263
  ```typescript
88
- 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';
266
+
267
+ // All API endpoints are strongly typed
268
+ const articles: types.IArticle[] = await api.article.findAll();
269
+ ```
270
+
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
286
+
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
89
298
 
90
- const articles = await api.article.findAll();
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
312
+
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
91
343
  ```
92
344
 
93
- OpenAPI spec from this server drives toolkit code generation (`pnpm run --dir toolkit generate`).
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
94
354
 
95
- ## Docs & support
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)
96
359
 
97
- - [Documentation](https://docs.gaoredu.com/)
98
- - [Issues](https://github.com/fecommunity/reactpress/issues)
99
- - [Contributing](../CONTRIBUTING.md)
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
100
367
 
101
368
  ## License
102
369
 
103
- MIT — see [LICENSE](LICENSE).
370
+ MIT License - see [LICENSE](LICENSE) file for details.
371
+
372
+ ---
104
373
 
105
- <p align="center"><sub>Part of <a href="https://github.com/fecommunity/reactpress">ReactPress</a> — content owned by the system, frontend owned by developers.</sub></p>
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
  }
@@ -154,22 +154,6 @@ function startWithPM2() {
154
154
  }
155
155
  }
156
156
 
157
- // Function to prepend bundled runtime paths so sibling toolkit/ can resolve server/node_modules.
158
- function prependNodePath(...dirs) {
159
- const Module = require('module');
160
- const sep = path.delimiter;
161
- const parts = (process.env.NODE_PATH || '').split(sep).filter(Boolean);
162
- for (const dir of dirs) {
163
- if (fs.existsSync(dir) && !parts.includes(dir)) {
164
- parts.unshift(dir);
165
- }
166
- }
167
- if (parts.length) {
168
- process.env.NODE_PATH = parts.join(sep);
169
- Module._initPaths();
170
- }
171
- }
172
-
173
157
  // Function to start with regular Node.js
174
158
  function startWithNode() {
175
159
  // Check if the server is built
@@ -196,43 +180,15 @@ function startWithNode() {
196
180
  console.log(`[ReactPress Server] Using existing REACTPRESS_ORIGINAL_CWD: ${process.env.REACTPRESS_ORIGINAL_CWD}`);
197
181
  }
198
182
 
199
- const siteRoot = process.env.REACTPRESS_ORIGINAL_CWD;
200
- for (const localSiteModule of [
201
- path.join(serverDir, '..', 'cli', 'out', 'core', 'services', 'local-site.js'),
202
- path.join(serverDir, '..', 'out', 'core', 'services', 'local-site.js'),
203
- ]) {
204
- if (!siteRoot || !fs.existsSync(localSiteModule)) continue;
205
- try {
206
- const { ensureBundledPlugins } = require(localSiteModule);
207
- if (ensureBundledPlugins(siteRoot)) {
208
- console.log('[ReactPress Server] Seeded bundled plugins into project');
209
- }
210
- } catch {
211
- // ignore — plugins seeding is best-effort
212
- }
213
- break;
214
- }
215
-
216
183
  // Change to the server directory
217
184
  process.chdir(serverDir);
218
185
 
219
186
  // Set environment variables
220
187
  process.env.NODE_ENV = process.env.NODE_ENV || 'production';
221
188
 
222
- // Bundled CLI layout: toolkit/ is a sibling of server/; expose server deps to toolkit requires.
223
- prependNodePath(path.join(serverDir, 'node_modules'));
224
-
225
- // Import and run the server (require() alone does not invoke main — see dist/main.js)
189
+ // Import and run the server
226
190
  try {
227
- const mainModule = require(distPath);
228
- if (typeof mainModule.main !== 'function') {
229
- console.error('[ReactPress Server] Server entry does not export main()');
230
- process.exit(1);
231
- }
232
- mainModule.main().catch((error) => {
233
- console.error('[ReactPress Server] Failed to start server:', error);
234
- process.exit(1);
235
- });
191
+ require(distPath);
236
192
  } catch (error) {
237
193
  console.error('[ReactPress Server] Failed to start server:', error);
238
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 config_1 = require("../../toolkit/dist/config");
10
+ const reactpress_config_1 = require("@fecommunity/reactpress-config");
11
11
  const common_1 = require("@nestjs/common");
12
- const config_2 = require("@nestjs/config");
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_2.ConfigModule.forRoot({ isGlobal: true, envFilePath: [config_1.config.file] }),
44
+ config_1.ConfigModule.forRoot({ isGlobal: true, envFilePath: [reactpress_config_1.file] }),
39
45
  typeorm_1.TypeOrmModule.forRootAsync({
40
- imports: [config_2.ConfigModule],
41
- inject: [config_2.ConfigService],
42
- useFactory: async (configService) => (0, typeorm_options_1.createTypeOrmOptions)(configService),
46
+ imports: [config_1.ConfigModule],
47
+ inject: [config_1.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,sDAAgE;AAChE,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,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Aa;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,GAAG,CAAC,WAAW,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;QAEjC,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC;QAChC,MAAM,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,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AAG,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 {};