@fecommunity/reactpress 3.7.0 → 4.0.0-beta.0

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 (406) hide show
  1. package/bin/reactpress-cli-shim.js +2 -6
  2. package/bin/reactpress-theme-client.js +2 -0
  3. package/bin/reactpress.js +1 -380
  4. package/out/.source-fingerprint-cli +1 -0
  5. package/out/bin/reactpress-cli-shim.d.ts +3 -0
  6. package/out/bin/reactpress-cli-shim.d.ts.map +1 -0
  7. package/out/bin/reactpress-cli-shim.js +28 -0
  8. package/out/bin/reactpress-cli-shim.js.map +1 -0
  9. package/out/bin/reactpress-theme-client.d.ts +3 -0
  10. package/out/bin/reactpress-theme-client.d.ts.map +1 -0
  11. package/out/bin/reactpress-theme-client.js +113 -0
  12. package/out/bin/reactpress-theme-client.js.map +1 -0
  13. package/out/bin/reactpress.d.ts +3 -0
  14. package/out/bin/reactpress.d.ts.map +1 -0
  15. package/out/bin/reactpress.js +534 -0
  16. package/out/bin/reactpress.js.map +1 -0
  17. package/out/core/services/config.d.ts +12 -0
  18. package/out/core/services/config.d.ts.map +1 -0
  19. package/out/core/services/config.js +137 -0
  20. package/out/core/services/config.js.map +1 -0
  21. package/out/core/services/database/index.d.ts +17 -0
  22. package/out/core/services/database/index.d.ts.map +1 -0
  23. package/out/core/services/database/index.js +242 -0
  24. package/out/core/services/database/index.js.map +1 -0
  25. package/out/core/services/database/mysql.d.ts +14 -0
  26. package/out/core/services/database/mysql.d.ts.map +1 -0
  27. package/out/core/services/database/mysql.js +82 -0
  28. package/out/core/services/database/mysql.js.map +1 -0
  29. package/out/core/services/database/profile.d.ts +6 -0
  30. package/out/core/services/database/profile.d.ts.map +1 -0
  31. package/out/core/services/database/profile.js +60 -0
  32. package/out/core/services/database/profile.js.map +1 -0
  33. package/out/core/services/database/sqlite.d.ts +10 -0
  34. package/out/core/services/database/sqlite.d.ts.map +1 -0
  35. package/out/core/services/database/sqlite.js +73 -0
  36. package/out/core/services/database/sqlite.js.map +1 -0
  37. package/out/core/services/exec.d.ts +21 -0
  38. package/out/core/services/exec.d.ts.map +1 -0
  39. package/out/core/services/exec.js +56 -0
  40. package/out/core/services/exec.js.map +1 -0
  41. package/out/core/services/init.d.ts +11 -0
  42. package/out/core/services/init.d.ts.map +1 -0
  43. package/out/core/services/init.js +60 -0
  44. package/out/core/services/init.js.map +1 -0
  45. package/out/core/services/local-site.d.ts +24 -0
  46. package/out/core/services/local-site.d.ts.map +1 -0
  47. package/out/core/services/local-site.js +144 -0
  48. package/out/core/services/local-site.js.map +1 -0
  49. package/out/core/utils/cli-context.d.ts +3 -0
  50. package/out/core/utils/cli-context.d.ts.map +1 -0
  51. package/out/core/utils/cli-context.js +12 -0
  52. package/out/core/utils/cli-context.js.map +1 -0
  53. package/out/core/utils/paths.d.ts +20 -0
  54. package/out/core/utils/paths.d.ts.map +1 -0
  55. package/out/core/utils/paths.js +34 -0
  56. package/out/core/utils/paths.js.map +1 -0
  57. package/out/core/utils/platform.d.ts +7 -0
  58. package/out/core/utils/platform.d.ts.map +1 -0
  59. package/out/core/utils/platform.js +28 -0
  60. package/out/core/utils/platform.js.map +1 -0
  61. package/out/core/utils/port.d.ts +4 -0
  62. package/out/core/utils/port.d.ts.map +1 -0
  63. package/out/core/utils/port.js +32 -0
  64. package/out/core/utils/port.js.map +1 -0
  65. package/out/lib/api-dev-runner.d.ts +3 -0
  66. package/out/lib/api-dev-runner.d.ts.map +1 -0
  67. package/{lib → out/lib}/api-dev-runner.js +4 -1
  68. package/out/lib/api-dev-runner.js.map +1 -0
  69. package/out/lib/api-dev.d.ts +2 -0
  70. package/out/lib/api-dev.d.ts.map +1 -0
  71. package/out/lib/api-dev.js +101 -0
  72. package/out/lib/api-dev.js.map +1 -0
  73. package/out/lib/bootstrap.d.ts +18 -0
  74. package/out/lib/bootstrap.d.ts.map +1 -0
  75. package/out/lib/bootstrap.js +93 -0
  76. package/out/lib/bootstrap.js.map +1 -0
  77. package/out/lib/build.d.ts +2 -0
  78. package/out/lib/build.d.ts.map +1 -0
  79. package/out/lib/build.js +191 -0
  80. package/out/lib/build.js.map +1 -0
  81. package/out/lib/db-backup.d.ts +2 -0
  82. package/out/lib/db-backup.d.ts.map +1 -0
  83. package/out/lib/db-backup.js +68 -0
  84. package/out/lib/db-backup.js.map +1 -0
  85. package/out/lib/dev-banner.d.ts +2 -0
  86. package/out/lib/dev-banner.d.ts.map +1 -0
  87. package/out/lib/dev-banner.js +102 -0
  88. package/out/lib/dev-banner.js.map +1 -0
  89. package/out/lib/dev-child-io.d.ts +2 -0
  90. package/out/lib/dev-child-io.d.ts.map +1 -0
  91. package/out/lib/dev-child-io.js +80 -0
  92. package/out/lib/dev-child-io.js.map +1 -0
  93. package/out/lib/dev-log.d.ts +2 -0
  94. package/out/lib/dev-log.d.ts.map +1 -0
  95. package/out/lib/dev-log.js +64 -0
  96. package/out/lib/dev-log.js.map +1 -0
  97. package/out/lib/dev-session.d.ts +2 -0
  98. package/out/lib/dev-session.d.ts.map +1 -0
  99. package/out/lib/dev-session.js +95 -0
  100. package/out/lib/dev-session.js.map +1 -0
  101. package/out/lib/dev.d.ts +2 -0
  102. package/out/lib/dev.d.ts.map +1 -0
  103. package/out/lib/dev.js +906 -0
  104. package/out/lib/dev.js.map +1 -0
  105. package/out/lib/docker.d.ts +2 -0
  106. package/out/lib/docker.d.ts.map +1 -0
  107. package/out/lib/docker.js +398 -0
  108. package/out/lib/docker.js.map +1 -0
  109. package/out/lib/doctor.d.ts +2 -0
  110. package/out/lib/doctor.d.ts.map +1 -0
  111. package/out/lib/doctor.js +260 -0
  112. package/out/lib/doctor.js.map +1 -0
  113. package/out/lib/health-parse.d.ts +5 -0
  114. package/out/lib/health-parse.d.ts.map +1 -0
  115. package/out/lib/health-parse.js +36 -0
  116. package/out/lib/health-parse.js.map +1 -0
  117. package/out/lib/health-parse.test.d.ts +2 -0
  118. package/out/lib/health-parse.test.d.ts.map +1 -0
  119. package/out/lib/health-parse.test.js +19 -0
  120. package/out/lib/health-parse.test.js.map +1 -0
  121. package/out/lib/http.d.ts +2 -0
  122. package/out/lib/http.d.ts.map +1 -0
  123. package/out/lib/http.js +234 -0
  124. package/out/lib/http.js.map +1 -0
  125. package/out/lib/i18n/index.d.ts +2 -0
  126. package/out/lib/i18n/index.d.ts.map +1 -0
  127. package/out/lib/i18n/index.js +29 -0
  128. package/out/lib/i18n/index.js.map +1 -0
  129. package/out/lib/i18n/strings.d.ts +2 -0
  130. package/out/lib/i18n/strings.d.ts.map +1 -0
  131. package/out/lib/i18n/strings.js +1140 -0
  132. package/out/lib/i18n/strings.js.map +1 -0
  133. package/out/lib/lifecycle.d.ts +2 -0
  134. package/out/lib/lifecycle.d.ts.map +1 -0
  135. package/out/lib/lifecycle.js +169 -0
  136. package/out/lib/lifecycle.js.map +1 -0
  137. package/out/lib/nginx.d.ts +2 -0
  138. package/out/lib/nginx.d.ts.map +1 -0
  139. package/out/lib/nginx.js +618 -0
  140. package/out/lib/nginx.js.map +1 -0
  141. package/out/lib/paths.d.ts +2 -0
  142. package/out/lib/paths.d.ts.map +1 -0
  143. package/out/lib/paths.js +106 -0
  144. package/out/lib/paths.js.map +1 -0
  145. package/out/lib/plugin-build.d.ts +2 -0
  146. package/out/lib/plugin-build.d.ts.map +1 -0
  147. package/out/lib/plugin-build.js +104 -0
  148. package/out/lib/plugin-build.js.map +1 -0
  149. package/out/lib/plugin-cli.d.ts +2 -0
  150. package/out/lib/plugin-cli.d.ts.map +1 -0
  151. package/out/lib/plugin-cli.js +142 -0
  152. package/out/lib/plugin-cli.js.map +1 -0
  153. package/out/lib/pm2.d.ts +2 -0
  154. package/out/lib/pm2.d.ts.map +1 -0
  155. package/out/lib/pm2.js +32 -0
  156. package/out/lib/pm2.js.map +1 -0
  157. package/out/lib/ports.d.ts +2 -0
  158. package/out/lib/ports.d.ts.map +1 -0
  159. package/out/lib/ports.js +394 -0
  160. package/out/lib/ports.js.map +1 -0
  161. package/out/lib/process.d.ts +2 -0
  162. package/out/lib/process.d.ts.map +1 -0
  163. package/out/lib/process.js +47 -0
  164. package/out/lib/process.js.map +1 -0
  165. package/out/lib/prod-memory.d.ts +6 -0
  166. package/out/lib/prod-memory.d.ts.map +1 -0
  167. package/out/lib/prod-memory.js +57 -0
  168. package/out/lib/prod-memory.js.map +1 -0
  169. package/out/lib/project-type.d.ts +2 -0
  170. package/out/lib/project-type.d.ts.map +1 -0
  171. package/out/lib/project-type.js +77 -0
  172. package/out/lib/project-type.js.map +1 -0
  173. package/out/lib/publish.d.ts +3 -0
  174. package/out/lib/publish.d.ts.map +1 -0
  175. package/out/lib/publish.js +388 -0
  176. package/out/lib/publish.js.map +1 -0
  177. package/out/lib/remote-dev.d.ts +2 -0
  178. package/out/lib/remote-dev.d.ts.map +1 -0
  179. package/out/lib/remote-dev.js +158 -0
  180. package/out/lib/remote-dev.js.map +1 -0
  181. package/out/lib/root.d.ts +2 -0
  182. package/out/lib/root.d.ts.map +1 -0
  183. package/out/lib/root.js +85 -0
  184. package/out/lib/root.js.map +1 -0
  185. package/out/lib/spawn.d.ts +2 -0
  186. package/out/lib/spawn.d.ts.map +1 -0
  187. package/out/lib/spawn.js +96 -0
  188. package/out/lib/spawn.js.map +1 -0
  189. package/out/lib/status.d.ts +2 -0
  190. package/out/lib/status.d.ts.map +1 -0
  191. package/out/lib/status.js +78 -0
  192. package/out/lib/status.js.map +1 -0
  193. package/out/lib/theme-catalog.d.ts +2 -0
  194. package/out/lib/theme-catalog.d.ts.map +1 -0
  195. package/out/lib/theme-catalog.js +6 -0
  196. package/out/lib/theme-catalog.js.map +1 -0
  197. package/out/lib/theme-cli.d.ts +2 -0
  198. package/out/lib/theme-cli.d.ts.map +1 -0
  199. package/out/lib/theme-cli.js +50 -0
  200. package/out/lib/theme-cli.js.map +1 -0
  201. package/out/lib/theme-dev.d.ts +2 -0
  202. package/out/lib/theme-dev.d.ts.map +1 -0
  203. package/out/lib/theme-dev.js +759 -0
  204. package/out/lib/theme-dev.js.map +1 -0
  205. package/out/lib/theme-env.d.ts +2 -0
  206. package/out/lib/theme-env.d.ts.map +1 -0
  207. package/out/lib/theme-env.js +101 -0
  208. package/out/lib/theme-env.js.map +1 -0
  209. package/out/lib/theme-install.d.ts +2 -0
  210. package/out/lib/theme-install.d.ts.map +1 -0
  211. package/out/lib/theme-install.js +363 -0
  212. package/out/lib/theme-install.js.map +1 -0
  213. package/out/lib/theme-lock.d.ts +2 -0
  214. package/out/lib/theme-lock.d.ts.map +1 -0
  215. package/out/lib/theme-lock.js +70 -0
  216. package/out/lib/theme-lock.js.map +1 -0
  217. package/out/lib/theme-paths.d.ts +2 -0
  218. package/out/lib/theme-paths.d.ts.map +1 -0
  219. package/out/lib/theme-paths.js +73 -0
  220. package/out/lib/theme-paths.js.map +1 -0
  221. package/out/lib/theme-placeholder-cover.d.ts +13 -0
  222. package/out/lib/theme-placeholder-cover.d.ts.map +1 -0
  223. package/out/lib/theme-placeholder-cover.js +95 -0
  224. package/out/lib/theme-placeholder-cover.js.map +1 -0
  225. package/out/lib/theme-preview-frame.d.ts +2 -0
  226. package/out/lib/theme-preview-frame.d.ts.map +1 -0
  227. package/out/lib/theme-preview-frame.js +107 -0
  228. package/out/lib/theme-preview-frame.js.map +1 -0
  229. package/out/lib/theme-preview-pool.d.ts +2 -0
  230. package/out/lib/theme-preview-pool.d.ts.map +1 -0
  231. package/out/lib/theme-preview-pool.js +484 -0
  232. package/out/lib/theme-preview-pool.js.map +1 -0
  233. package/out/lib/theme-preview-proxy.d.ts +2 -0
  234. package/out/lib/theme-preview-proxy.d.ts.map +1 -0
  235. package/out/lib/theme-preview-proxy.js +101 -0
  236. package/out/lib/theme-preview-proxy.js.map +1 -0
  237. package/out/lib/theme-prod.d.ts +2 -0
  238. package/out/lib/theme-prod.d.ts.map +1 -0
  239. package/out/lib/theme-prod.js +400 -0
  240. package/out/lib/theme-prod.js.map +1 -0
  241. package/out/lib/theme-registry.d.ts +2 -0
  242. package/out/lib/theme-registry.d.ts.map +1 -0
  243. package/out/lib/theme-registry.js +135 -0
  244. package/out/lib/theme-registry.js.map +1 -0
  245. package/out/lib/theme-runtime.d.ts +2 -0
  246. package/out/lib/theme-runtime.d.ts.map +1 -0
  247. package/out/lib/theme-runtime.js +344 -0
  248. package/out/lib/theme-runtime.js.map +1 -0
  249. package/out/lib/theme-sources.d.ts +2 -0
  250. package/out/lib/theme-sources.d.ts.map +1 -0
  251. package/out/lib/theme-sources.js +347 -0
  252. package/out/lib/theme-sources.js.map +1 -0
  253. package/out/lib/theme-warmup.d.ts +2 -0
  254. package/out/lib/theme-warmup.d.ts.map +1 -0
  255. package/out/lib/theme-warmup.js +167 -0
  256. package/out/lib/theme-warmup.js.map +1 -0
  257. package/out/lib/toolkit-build.d.ts +2 -0
  258. package/out/lib/toolkit-build.d.ts.map +1 -0
  259. package/out/lib/toolkit-build.js +57 -0
  260. package/out/lib/toolkit-build.js.map +1 -0
  261. package/out/types/config.d.ts +57 -0
  262. package/out/types/config.d.ts.map +1 -0
  263. package/out/types/config.js +3 -0
  264. package/out/types/config.js.map +1 -0
  265. package/out/ui/banner.d.ts +2 -0
  266. package/out/ui/banner.d.ts.map +1 -0
  267. package/out/ui/banner.js +358 -0
  268. package/out/ui/banner.js.map +1 -0
  269. package/out/ui/interactive.d.ts +2 -0
  270. package/out/ui/interactive.d.ts.map +1 -0
  271. package/out/ui/interactive.js +328 -0
  272. package/out/ui/interactive.js.map +1 -0
  273. package/out/ui/theme.d.ts +2 -0
  274. package/out/ui/theme.d.ts.map +1 -0
  275. package/out/ui/theme.js +250 -0
  276. package/out/ui/theme.js.map +1 -0
  277. package/package.json +13 -7
  278. package/server/dist/common/api-messages.d.ts +9 -0
  279. package/server/dist/common/api-messages.js +9 -0
  280. package/server/dist/common/api-messages.js.map +1 -1
  281. package/server/dist/database/typeorm-options.d.ts +3 -0
  282. package/server/dist/database/typeorm-options.js +60 -0
  283. package/server/dist/database/typeorm-options.js.map +1 -0
  284. package/server/dist/modules/api-key/api-key.controller.js.map +1 -1
  285. package/server/dist/modules/api-key/api-key.entity.js.map +1 -1
  286. package/server/dist/modules/api-key/api-key.guard.js +2 -3
  287. package/server/dist/modules/api-key/api-key.guard.js.map +1 -1
  288. package/server/dist/modules/api-key/api-key.module.js.map +1 -1
  289. package/server/dist/modules/api-key/api-key.service.js +1 -1
  290. package/server/dist/modules/api-key/api-key.service.js.map +1 -1
  291. package/server/dist/modules/article/article-revision.entity.js +3 -3
  292. package/server/dist/modules/article/article-revision.entity.js.map +1 -1
  293. package/server/dist/modules/article/article-slug.util.d.ts +2 -0
  294. package/server/dist/modules/article/article-slug.util.js +19 -0
  295. package/server/dist/modules/article/article-slug.util.js.map +1 -0
  296. package/server/dist/modules/article/scheduled-publish.service.js.map +1 -1
  297. package/server/dist/modules/bootstrap/bootstrap.constants.d.ts +20 -0
  298. package/server/dist/modules/bootstrap/bootstrap.constants.js +171 -0
  299. package/server/dist/modules/bootstrap/bootstrap.constants.js.map +1 -0
  300. package/server/dist/modules/bootstrap/bootstrap.service.d.ts +22 -0
  301. package/server/dist/modules/bootstrap/bootstrap.service.js +183 -0
  302. package/server/dist/modules/bootstrap/bootstrap.service.js.map +1 -0
  303. package/server/dist/modules/bootstrap/install-locale.d.ts +2 -0
  304. package/server/dist/modules/bootstrap/install-locale.js +11 -0
  305. package/server/dist/modules/bootstrap/install-locale.js.map +1 -0
  306. package/server/dist/modules/extension/extension.module.d.ts +9 -0
  307. package/server/dist/modules/extension/extension.module.js +50 -0
  308. package/server/dist/modules/extension/extension.module.js.map +1 -0
  309. package/server/dist/modules/extension/plugin-loader.service.d.ts +12 -0
  310. package/server/dist/modules/extension/plugin-loader.service.js +96 -0
  311. package/server/dist/modules/extension/plugin-loader.service.js.map +1 -0
  312. package/server/dist/modules/extension/plugin-registry.bridge.d.ts +3 -0
  313. package/server/dist/modules/extension/plugin-registry.bridge.js +44 -0
  314. package/server/dist/modules/extension/plugin-registry.bridge.js.map +1 -0
  315. package/server/dist/modules/extension/plugin.controller.d.ts +22 -0
  316. package/server/dist/modules/extension/plugin.controller.js +155 -0
  317. package/server/dist/modules/extension/plugin.controller.js.map +1 -0
  318. package/server/dist/modules/extension/plugin.service.d.ts +52 -0
  319. package/server/dist/modules/extension/plugin.service.js +391 -0
  320. package/server/dist/modules/extension/plugin.service.js.map +1 -0
  321. package/server/dist/modules/extension/preview-draft.store.d.ts +13 -0
  322. package/server/dist/modules/extension/preview-draft.store.js +41 -0
  323. package/server/dist/modules/extension/preview-draft.store.js.map +1 -0
  324. package/server/dist/modules/extension/theme-registry.bridge.d.ts +56 -0
  325. package/server/dist/modules/extension/theme-registry.bridge.js +46 -0
  326. package/server/dist/modules/extension/theme-registry.bridge.js.map +1 -0
  327. package/server/dist/modules/extension/theme.controller.d.ts +66 -0
  328. package/server/dist/modules/extension/theme.controller.js +301 -0
  329. package/server/dist/modules/extension/theme.controller.js.map +1 -0
  330. package/server/dist/modules/extension/theme.service.d.ts +140 -0
  331. package/server/dist/modules/extension/theme.service.js +1039 -0
  332. package/server/dist/modules/extension/theme.service.js.map +1 -0
  333. package/server/dist/modules/file/file-optimization.controller.d.ts +12 -0
  334. package/server/dist/modules/file/file-optimization.controller.js +79 -0
  335. package/server/dist/modules/file/file-optimization.controller.js.map +1 -0
  336. package/server/dist/modules/file/file-optimization.service.d.ts +36 -0
  337. package/server/dist/modules/file/file-optimization.service.js +385 -0
  338. package/server/dist/modules/file/file-optimization.service.js.map +1 -0
  339. package/server/dist/modules/file/file-optimization.types.d.ts +66 -0
  340. package/server/dist/modules/file/file-optimization.types.js +5 -0
  341. package/server/dist/modules/file/file-optimization.types.js.map +1 -0
  342. package/server/dist/modules/file/image-optimizer-plugin.guard.d.ts +7 -0
  343. package/server/dist/modules/file/image-optimizer-plugin.guard.js +33 -0
  344. package/server/dist/modules/file/image-optimizer-plugin.guard.js.map +1 -0
  345. package/server/dist/modules/health/health.controller.js +2 -4
  346. package/server/dist/modules/health/health.controller.js.map +1 -1
  347. package/server/dist/modules/health/health.module.js.map +1 -1
  348. package/server/dist/modules/hook/hook.module.d.ts +2 -0
  349. package/server/dist/modules/hook/hook.module.js +22 -0
  350. package/server/dist/modules/hook/hook.module.js.map +1 -0
  351. package/server/dist/modules/hook/hook.service.d.ts +26 -0
  352. package/server/dist/modules/hook/hook.service.js +105 -0
  353. package/server/dist/modules/hook/hook.service.js.map +1 -0
  354. package/server/dist/modules/webhook/webhook.controller.js.map +1 -1
  355. package/server/dist/modules/webhook/webhook.entity.js.map +1 -1
  356. package/server/dist/modules/webhook/webhook.module.js.map +1 -1
  357. package/server/dist/modules/webhook/webhook.service.d.ts +1 -1
  358. package/server/dist/modules/webhook/webhook.service.js +5 -2
  359. package/server/dist/modules/webhook/webhook.service.js.map +1 -1
  360. package/server/dist/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  361. package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  362. package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  363. package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  364. package/server/dist/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
  365. package/server/dist/tsconfig.tsbuildinfo +1 -0
  366. package/server/dist/utils/image-processor.util.d.ts +23 -0
  367. package/server/dist/utils/image-processor.util.js +88 -0
  368. package/server/dist/utils/image-processor.util.js.map +1 -0
  369. package/server/dist/utils/local-api-quiet.util.d.ts +1 -0
  370. package/server/dist/utils/local-api-quiet.util.js +8 -0
  371. package/server/dist/utils/local-api-quiet.util.js.map +1 -0
  372. package/server/dist/utils/project-root.util.d.ts +2 -0
  373. package/server/dist/utils/project-root.util.js +42 -0
  374. package/server/dist/utils/project-root.util.js.map +1 -0
  375. package/server/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  376. package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  377. package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  378. package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  379. package/server/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
  380. package/templates/config.local.json +13 -0
  381. package/templates/env.local.default +10 -0
  382. package/templates/theme-catalog.json +27 -0
  383. package/lib/api-dev.js +0 -89
  384. package/lib/bootstrap.js +0 -114
  385. package/lib/build.js +0 -162
  386. package/lib/db-backup.js +0 -67
  387. package/lib/dev-banner.js +0 -72
  388. package/lib/dev.js +0 -141
  389. package/lib/docker.js +0 -275
  390. package/lib/doctor.js +0 -266
  391. package/lib/http.js +0 -182
  392. package/lib/i18n/index.js +0 -32
  393. package/lib/i18n/strings.js +0 -846
  394. package/lib/lifecycle.js +0 -190
  395. package/lib/nginx.js +0 -342
  396. package/lib/paths.js +0 -108
  397. package/lib/pm2.js +0 -32
  398. package/lib/process.js +0 -45
  399. package/lib/project-type.js +0 -72
  400. package/lib/publish.js +0 -968
  401. package/lib/root.js +0 -88
  402. package/lib/spawn.js +0 -92
  403. package/lib/status.js +0 -132
  404. package/ui/banner.js +0 -441
  405. package/ui/interactive.js +0 -380
  406. package/ui/theme.js +0 -265
package/lib/doctor.js DELETED
@@ -1,266 +0,0 @@
1
- const fs = require('fs');
2
- const net = require('net');
3
- const path = require('path');
4
- const { execSync } = require('child_process');
5
- const ora = require('ora');
6
- const {
7
- brand,
8
- icon,
9
- ok,
10
- warn,
11
- divider,
12
- sectionHeader,
13
- terminalWidth,
14
- gradientText,
15
- palette,
16
- } = require('../ui/theme');
17
- const { getHealthUrl, checkHealth } = require('./http');
18
- const { isDockerRunning } = require('./docker');
19
- const { checkNginx } = require('./nginx');
20
- const { envFileStatus } = require('./status');
21
- const { t } = require('./i18n');
22
-
23
- function checkNodeVersion() {
24
- const major = parseInt(process.versions.node.split('.')[0], 10);
25
- if (major >= 18) {
26
- return { ok: true, message: `Node.js ${process.version}` };
27
- }
28
- return {
29
- ok: false,
30
- message: t('doctor.nodeBad', { version: process.version }),
31
- fix: t('doctor.nodeFix'),
32
- };
33
- }
34
-
35
- function checkDocker() {
36
- if (isDockerRunning()) {
37
- return { ok: true, message: t('doctor.dockerOk') };
38
- }
39
- return {
40
- ok: false,
41
- message: t('doctor.dockerBad'),
42
- fix: t('doctor.dockerFix'),
43
- };
44
- }
45
-
46
- function parseEnv(projectRoot) {
47
- const envPath = path.join(projectRoot, '.env');
48
- const out = {};
49
- try {
50
- const content = fs.readFileSync(envPath, 'utf8');
51
- for (const line of content.split('\n')) {
52
- const m = line.match(/^([A-Z_]+)=(.*)$/);
53
- if (m) out[m[1]] = m[2].trim().replace(/^['"]|['"]$/g, '');
54
- }
55
- } catch {
56
- // ignore
57
- }
58
- return out;
59
- }
60
-
61
- function checkPort(port, host = '127.0.0.1') {
62
- return new Promise((resolve) => {
63
- const socket = net.createConnection({ port, host }, () => {
64
- socket.destroy();
65
- resolve(true);
66
- });
67
- socket.on('error', () => resolve(false));
68
- socket.setTimeout(1000, () => {
69
- socket.destroy();
70
- resolve(false);
71
- });
72
- });
73
- }
74
-
75
- async function checkPorts(projectRoot) {
76
- const env = parseEnv(projectRoot);
77
- const apiPort = parseInt(env.SERVER_PORT || '3002', 10);
78
- const clientPort = parseInt(env.CLIENT_PORT || '3001', 10);
79
-
80
- const healthUrl = getHealthUrl(projectRoot);
81
- const apiHealth = await checkHealth(healthUrl);
82
- if (apiHealth.ok) {
83
- return {
84
- ok: true,
85
- message: t('doctor.portOk', { apiPort, clientPort }),
86
- };
87
- }
88
-
89
- const [apiBusy, clientBusy] = await Promise.all([checkPort(apiPort), checkPort(clientPort)]);
90
- const issues = [];
91
- if (apiBusy) issues.push(t('doctor.portApiBusy', { port: apiPort }));
92
- if (clientBusy) issues.push(t('doctor.portClientBusy', { port: clientPort }));
93
- if (issues.length) {
94
- return {
95
- ok: false,
96
- message: issues.join('; '),
97
- fix: t('doctor.portFix'),
98
- };
99
- }
100
- return {
101
- ok: true,
102
- message: t('doctor.portOk', { apiPort, clientPort }),
103
- };
104
- }
105
-
106
- async function checkDatabase(projectRoot) {
107
- const env = parseEnv(projectRoot);
108
- const host = env.DB_HOST || '127.0.0.1';
109
- const port = parseInt(env.DB_PORT || '3306', 10);
110
- const user = env.DB_USER || 'root';
111
- const password = env.DB_PASSWD || env.DB_PASSWORD || 'root';
112
- const database = env.DB_DATABASE || 'reactpress';
113
-
114
- return new Promise((resolve) => {
115
- let mysql;
116
- try {
117
- mysql = require('mysql2/promise');
118
- } catch {
119
- try {
120
- mysql = require(path.join(projectRoot, 'server/node_modules/mysql2/promise'));
121
- } catch {
122
- resolve({
123
- ok: false,
124
- message: t('doctor.dbNoMysql2'),
125
- fix: t('doctor.dbMysql2Fix'),
126
- });
127
- return;
128
- }
129
- }
130
-
131
- mysql
132
- .createConnection({ host, port, user, password, database, connectTimeout: 5000 })
133
- .then(async (conn) => {
134
- await conn.ping();
135
- await conn.end();
136
- resolve({
137
- ok: true,
138
- message: t('doctor.dbOk', { host, port, database }),
139
- });
140
- })
141
- .catch((err) => {
142
- resolve({
143
- ok: false,
144
- message: t('doctor.dbBad', { error: err.message }),
145
- fix: t('doctor.dbFix'),
146
- });
147
- });
148
- });
149
- }
150
-
151
- async function checkApiHealth(projectRoot) {
152
- const healthUrl = getHealthUrl(projectRoot);
153
- const result = await checkHealth(healthUrl);
154
- if (result.ok) {
155
- return { ok: true, message: t('doctor.apiOk', { url: healthUrl }) };
156
- }
157
- return {
158
- ok: false,
159
- message: t('doctor.apiBad', { url: healthUrl }),
160
- fix: t('doctor.apiFix'),
161
- };
162
- }
163
-
164
- function checkPnpm() {
165
- try {
166
- const v = execSync('pnpm -v', { encoding: 'utf8' }).trim();
167
- return { ok: true, message: `pnpm ${v}` };
168
- } catch {
169
- return {
170
- ok: false,
171
- message: t('doctor.pnpmBad'),
172
- fix: t('doctor.pnpmFix'),
173
- };
174
- }
175
- }
176
-
177
- async function runCheckWithSpinner(name, run) {
178
- const spinner = ora({
179
- text: t('doctor.checking', { name }),
180
- color: 'magenta',
181
- spinner: 'dots',
182
- }).start();
183
- const result = await run();
184
- if (result.ok) {
185
- spinner.stop();
186
- } else {
187
- spinner.stop();
188
- }
189
- return result;
190
- }
191
-
192
- async function runDoctor(projectRoot) {
193
- const env = envFileStatus(projectRoot);
194
- const checks = [
195
- { name: 'Node.js', run: () => checkNodeVersion() },
196
- { name: 'pnpm', run: () => checkPnpm() },
197
- {
198
- name: t('doctor.check.config'),
199
- run: () => ({
200
- ok: env.config,
201
- message: env.config ? t('doctor.configOk') : t('doctor.configBad'),
202
- fix: t('doctor.configFix'),
203
- }),
204
- },
205
- {
206
- name: t('doctor.check.env'),
207
- run: () => ({
208
- ok: env.env,
209
- message: env.env ? t('doctor.envOk') : t('doctor.envBad'),
210
- fix: t('doctor.envFix'),
211
- }),
212
- },
213
- { name: 'Docker', run: () => checkDocker() },
214
- { name: t('doctor.check.nginx'), run: () => checkNginx(projectRoot) },
215
- { name: t('doctor.check.ports'), run: () => checkPorts(projectRoot) },
216
- { name: t('doctor.check.database'), run: () => checkDatabase(projectRoot) },
217
- { name: t('doctor.check.api'), run: () => checkApiHealth(projectRoot) },
218
- ];
219
-
220
- const w = Math.min(terminalWidth() - 4, 52);
221
- const results = [];
222
- const fixes = [];
223
-
224
- console.log('');
225
- console.log(
226
- ` ${gradientText(t('doctor.title'), [palette.primary, palette.accent], { bold: true })} ${brand.dim(t('doctor.subtitle'))}`
227
- );
228
- console.log(` ${brand.dim(t('doctor.project', { path: projectRoot }))}`);
229
- console.log(` ${divider(w)}`);
230
-
231
- for (const { name, run } of checks) {
232
- const result = await runCheckWithSpinner(name, run);
233
- results.push({ name, ...result });
234
- const mark = result.ok ? icon.ok : icon.fail;
235
- const msgColor = result.ok ? brand.dim : brand.warn;
236
- console.log(` ${mark} ${brand.bold(name)} ${msgColor(result.message)}`);
237
- if (!result.ok && result.fix) {
238
- fixes.push({ name, fix: result.fix });
239
- }
240
- }
241
-
242
- const passed = results.filter((r) => r.ok).length;
243
- const failed = results.length - passed;
244
-
245
- console.log(` ${divider(w)}`);
246
- console.log(
247
- ` ${brand.dim(t('doctor.summary', { passed, failed, total: results.length }))}`
248
- );
249
-
250
- if (failed === 0) {
251
- console.log(` ${ok(t('doctor.allPass'))}`);
252
- } else {
253
- console.log(` ${warn(t('doctor.failed', { count: failed }))}`);
254
- if (fixes.length) {
255
- console.log('');
256
- console.log(sectionHeader(t('doctor.fixesHeader')));
257
- for (const { name, fix } of fixes) {
258
- console.log(` ${brand.primary('→')} ${brand.dim(name)} ${brand.warn(fix)}`);
259
- }
260
- }
261
- }
262
- console.log('');
263
- return failed === 0 ? 0 : 1;
264
- }
265
-
266
- module.exports = { runDoctor };
package/lib/http.js DELETED
@@ -1,182 +0,0 @@
1
- const fs = require('fs');
2
- const http = require('http');
3
- const path = require('path');
4
-
5
- function loadServerSiteUrl(projectRoot) {
6
- const envPath = path.join(projectRoot, '.env');
7
- try {
8
- const content = fs.readFileSync(envPath, 'utf8');
9
- const match = content.match(/^SERVER_SITE_URL=(.+)$/m);
10
- if (match) {
11
- return match[1].trim().replace(/^['"]|['"]$/g, '');
12
- }
13
- } catch {
14
- // ignore
15
- }
16
- return 'http://localhost:3002';
17
- }
18
-
19
- function loadClientSiteUrl(projectRoot) {
20
- const envPath = path.join(projectRoot, '.env');
21
- try {
22
- const content = fs.readFileSync(envPath, 'utf8');
23
- const match = content.match(/^CLIENT_SITE_URL=(.+)$/m);
24
- if (match) {
25
- return match[1].trim().replace(/^['"]|['"]$/g, '');
26
- }
27
- } catch {
28
- // ignore
29
- }
30
- return 'http://localhost:3001';
31
- }
32
-
33
- function getApiPrefix(projectRoot) {
34
- const envPath = path.join(projectRoot, '.env');
35
- try {
36
- const content = fs.readFileSync(envPath, 'utf8');
37
- const match = content.match(/^SERVER_API_PREFIX=(.+)$/m);
38
- if (match) {
39
- return match[1].trim().replace(/^['"]|['"]$/g, '');
40
- }
41
- } catch {
42
- // ignore
43
- }
44
- return '/api';
45
- }
46
-
47
- function getHealthUrl(projectRoot) {
48
- const base = loadServerSiteUrl(projectRoot).replace(/\/$/, '');
49
- const prefix = getApiPrefix(projectRoot).replace(/\/$/, '');
50
- return `${base}${prefix}/health`;
51
- }
52
-
53
- function probeHttp(url, timeoutMs = 3000) {
54
- return new Promise((resolve) => {
55
- let parsed;
56
- try {
57
- parsed = new URL(url);
58
- } catch {
59
- resolve({ ok: false, statusCode: 0, data: null });
60
- return;
61
- }
62
- const port = parsed.port || (parsed.protocol === 'https:' ? 443 : 80);
63
- const req = http.request(
64
- {
65
- hostname: parsed.hostname,
66
- port,
67
- path: parsed.pathname + (parsed.search || ''),
68
- method: 'GET',
69
- timeout: timeoutMs,
70
- },
71
- (res) => {
72
- let body = '';
73
- res.on('data', (chunk) => {
74
- body += chunk;
75
- });
76
- res.on('end', () => {
77
- const ok = res.statusCode === 200;
78
- let data = null;
79
- try {
80
- data = JSON.parse(body);
81
- } catch {
82
- // ignore
83
- }
84
- resolve({ ok, statusCode: res.statusCode, data });
85
- });
86
- }
87
- );
88
- req.on('timeout', () => {
89
- req.destroy();
90
- resolve({ ok: false, statusCode: 0, data: null });
91
- });
92
- req.on('error', () => resolve({ ok: false, statusCode: 0, data: null }));
93
- req.end();
94
- });
95
- }
96
-
97
- /**
98
- * Health probe: prefers `/api/health` JSON; falls back to API prefix (e.g. Swagger)
99
- * for older bundled servers that omit the health route.
100
- */
101
- async function checkHealth(url, timeoutMs = 3000) {
102
- const primary = await probeHttp(url, timeoutMs);
103
- if (primary.ok) return primary;
104
-
105
- if (primary.statusCode === 404 || primary.statusCode === 0) {
106
- try {
107
- const parsed = new URL(url);
108
- const prefix = parsed.pathname.replace(/\/health\/?$/, '') || '/api';
109
- const candidates = [
110
- `${parsed.origin}${prefix}/`,
111
- `${parsed.origin}${prefix}`,
112
- parsed.origin,
113
- ];
114
- for (const fallback of candidates) {
115
- const alt = await probeHttp(fallback, timeoutMs);
116
- if (alt.statusCode === 200) {
117
- return {
118
- ok: true,
119
- statusCode: 200,
120
- data: { status: 'ok', database: 'unknown' },
121
- };
122
- }
123
- }
124
- } catch {
125
- // ignore
126
- }
127
- }
128
-
129
- return primary;
130
- }
131
-
132
- function isHttpResponding(url, timeoutMs = 2000) {
133
- return new Promise((resolve) => {
134
- let parsed;
135
- try {
136
- parsed = new URL(url);
137
- } catch {
138
- resolve(false);
139
- return;
140
- }
141
-
142
- const port = parsed.port || (parsed.protocol === 'https:' ? 443 : 80);
143
- const req = http.request(
144
- {
145
- hostname: parsed.hostname,
146
- port,
147
- path: parsed.pathname || '/',
148
- method: 'GET',
149
- timeout: timeoutMs,
150
- },
151
- (res) => resolve(res.statusCode > 0)
152
- );
153
-
154
- req.on('timeout', () => {
155
- req.destroy();
156
- resolve(false);
157
- });
158
- req.on('error', () => resolve(false));
159
- req.end();
160
- });
161
- }
162
-
163
- async function waitForHttp(url, timeoutMs = 120_000, intervalMs = 500) {
164
- const deadline = Date.now() + timeoutMs;
165
- while (Date.now() < deadline) {
166
- if (await isHttpResponding(url)) {
167
- return true;
168
- }
169
- await new Promise((r) => setTimeout(r, intervalMs));
170
- }
171
- return false;
172
- }
173
-
174
- module.exports = {
175
- loadServerSiteUrl,
176
- loadClientSiteUrl,
177
- getApiPrefix,
178
- getHealthUrl,
179
- checkHealth,
180
- isHttpResponding,
181
- waitForHttp,
182
- };
package/lib/i18n/index.js DELETED
@@ -1,32 +0,0 @@
1
- const { STRINGS } = require('./strings');
2
-
3
- function resolveLocale() {
4
- const raw = process.env.REACTPRESS_LANG || process.env.LANG || 'en';
5
- const code = String(raw).split(/[._-]/)[0].toLowerCase();
6
- return code === 'zh' ? 'zh' : 'en';
7
- }
8
-
9
- let locale = resolveLocale();
10
-
11
- /**
12
- * @param {string} key
13
- * @param {Record<string, string | number>} [vars]
14
- */
15
- function t(key, vars = {}) {
16
- const table = STRINGS[locale] || STRINGS.en;
17
- let text = table[key] ?? STRINGS.en[key] ?? key;
18
- for (const [name, value] of Object.entries(vars)) {
19
- text = text.replace(new RegExp(`\\{${name}\\}`, 'g'), String(value));
20
- }
21
- return text;
22
- }
23
-
24
- function getLocale() {
25
- return locale;
26
- }
27
-
28
- function setLocale(next) {
29
- locale = next === 'zh' ? 'zh' : 'en';
30
- }
31
-
32
- module.exports = { t, getLocale, setLocale, resolveLocale };