@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/db-backup.js DELETED
@@ -1,67 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { execSync } = require('child_process');
4
- const chalk = require('chalk');
5
- const { t } = require('./i18n');
6
- const { mysqldumpFromDbContainer } = require('./docker');
7
-
8
- function isLocalDbHost(host) {
9
- const h = String(host || '').toLowerCase();
10
- return h === '127.0.0.1' || h === 'localhost' || h === '::1' || h === '';
11
- }
12
-
13
- function isMysqldumpNotFoundError(err) {
14
- const msg = `${err && err.message ? err.message : ''}\n${err && err.stderr ? err.stderr : ''}`;
15
- if (err && err.status === 127) return true;
16
- return /command not found|not recognized as an internal or external command/i.test(msg);
17
- }
18
-
19
- function parseEnv(projectRoot) {
20
- const envPath = path.join(projectRoot, '.env');
21
- const out = {};
22
- try {
23
- const content = fs.readFileSync(envPath, 'utf8');
24
- for (const line of content.split('\n')) {
25
- const m = line.match(/^([A-Z_]+)=(.*)$/);
26
- if (m) out[m[1]] = m[2].trim().replace(/^['"]|['"]$/g, '');
27
- }
28
- } catch {
29
- // ignore
30
- }
31
- return out;
32
- }
33
-
34
- async function runDbBackup(projectRoot, outputPath) {
35
- const env = parseEnv(projectRoot);
36
- const host = env.DB_HOST || '127.0.0.1';
37
- const port = env.DB_PORT || '3306';
38
- const user = env.DB_USER || 'root';
39
- const password = env.DB_PASSWD || env.DB_PASSWORD || 'root';
40
- const database = env.DB_DATABASE || 'reactpress';
41
- const out =
42
- outputPath ||
43
- path.join(projectRoot, `reactpress-backup-${new Date().toISOString().replace(/[:.]/g, '-')}.sql`);
44
-
45
- const cmd = `mysqldump -h ${host} -P ${port} -u ${user} -p${password} ${database}`;
46
- console.log(chalk.cyan('[reactpress]'), t('db.backup.to', { path: out }));
47
- try {
48
- const dump = execSync(cmd, { encoding: 'utf8', maxBuffer: 50 * 1024 * 1024 });
49
- fs.writeFileSync(out, dump, 'utf8');
50
- console.log(chalk.green('[reactpress]'), t('db.backup.done'));
51
- return out;
52
- } catch (err) {
53
- if (isMysqldumpNotFoundError(err) && isLocalDbHost(host)) {
54
- const via = mysqldumpFromDbContainer(projectRoot, { user, password, database });
55
- if (via.ok) {
56
- console.log(chalk.cyan('[reactpress]'), t('db.backup.viaDocker'));
57
- fs.writeFileSync(out, via.stdout, 'utf8');
58
- console.log(chalk.green('[reactpress]'), t('db.backup.done'));
59
- return out;
60
- }
61
- }
62
- console.error(chalk.red('[reactpress]'), t('db.backup.fail'));
63
- throw err;
64
- }
65
- }
66
-
67
- module.exports = { runDbBackup };
package/lib/dev-banner.js DELETED
@@ -1,72 +0,0 @@
1
- const {
2
- brand,
3
- icon,
4
- ok,
5
- divider,
6
- padRight,
7
- terminalWidth,
8
- gradientText,
9
- palette,
10
- pulseBar,
11
- statusLights,
12
- } = require('../ui/theme');
13
- const {
14
- loadClientSiteUrl,
15
- loadServerSiteUrl,
16
- getApiPrefix,
17
- getHealthUrl,
18
- } = require('./http');
19
- const { t } = require('./i18n');
20
-
21
- function getDevUrls(projectRoot) {
22
- const client = loadClientSiteUrl(projectRoot).replace(/\/$/, '');
23
- const server = loadServerSiteUrl(projectRoot).replace(/\/$/, '');
24
- const prefix = getApiPrefix(projectRoot).replace(/\/$/, '') || '/api';
25
- return {
26
- site: client,
27
- admin: `${client}/admin`,
28
- api: `${server}${prefix}`,
29
- swagger: `${server}${prefix}`,
30
- health: getHealthUrl(projectRoot),
31
- };
32
- }
33
-
34
- function urlLine(key, url, { underline = true } = {}) {
35
- const keyCol = brand.muted(padRight(key, 10));
36
- const value = underline ? brand.accent.underline(url) : brand.dim(url);
37
- return ` ${brand.accent('▸ ')}${keyCol} ${value}`;
38
- }
39
-
40
- function printDevReadyBanner(projectRoot, { apiOnly = false } = {}) {
41
- const urls = getDevUrls(projectRoot);
42
- const w = Math.min(terminalWidth() - 4, 56);
43
-
44
- console.log('');
45
- console.log(
46
- ` ${icon.ok} ${gradientText(t('devBanner.ready'), [palette.green, palette.accent], { bold: true })} ${statusLights('online')}`
47
- );
48
- console.log(` ${brand.primary('╔' + '═'.repeat(w) + '╗')}`);
49
-
50
- if (!apiOnly) {
51
- console.log(urlLine(t('devBanner.site'), urls.site));
52
- console.log(urlLine(t('devBanner.admin'), urls.admin));
53
- }
54
- console.log(urlLine(t('devBanner.api'), urls.api));
55
- console.log(urlLine(t('devBanner.swagger'), urls.swagger));
56
- console.log(urlLine(t('devBanner.health'), urls.health, { underline: false }));
57
-
58
- const pulseWidth = Math.min(20, w - 4);
59
- if (pulseWidth > 6) {
60
- console.log(
61
- ` ${brand.muted(' ')}${pulseBar(pulseWidth, pulseWidth)} ${brand.success(t('devBanner.allSystemsGo'))}`
62
- );
63
- }
64
-
65
- console.log(` ${brand.primary('╚' + '═'.repeat(w) + '╝')}`);
66
- console.log(
67
- ` ${brand.dim(t('devBanner.hint'))} ${brand.muted('·')} ${brand.dim(t('devBanner.shortcuts'))}`
68
- );
69
- console.log('');
70
- }
71
-
72
- module.exports = { getDevUrls, printDevReadyBanner };
package/lib/dev.js DELETED
@@ -1,141 +0,0 @@
1
- const { spawn } = require('child_process');
2
- const path = require('path');
3
- const ora = require('ora');
4
- const { runBuild } = require('./build');
5
- const { ensureProjectEnvironment } = require('./bootstrap');
6
- const { loadServerSiteUrl, loadClientSiteUrl, waitForHttp } = require('./http');
7
- const { printDevReadyBanner } = require('./dev-banner');
8
- const { ensureOriginalCwd } = require('./root');
9
- const { detectProjectType, hasClient, hasToolkit } = require('./project-type');
10
- const { t } = require('./i18n');
11
-
12
- const CLIENT_READY_TIMEOUT_MS = 120_000;
13
- const API_READY_TIMEOUT_MS = 180_000;
14
-
15
- function formatDevFailureHint() {
16
- return [
17
- t('dev.nextSteps'),
18
- t('dev.nextDoctor'),
19
- t('dev.nextDocker'),
20
- t('dev.nextEnv'),
21
- ].join('\n');
22
- }
23
-
24
- let apiChild;
25
- let webChild;
26
- let shuttingDown = false;
27
-
28
- function shutdown(signal = 'SIGINT') {
29
- if (shuttingDown) return;
30
- shuttingDown = true;
31
- if (webChild && !webChild.killed) webChild.kill(signal);
32
- if (apiChild && !apiChild.killed) apiChild.kill(signal);
33
- }
34
-
35
- async function buildToolkit(projectRoot) {
36
- if (!hasToolkit(projectRoot)) return;
37
- await runBuild('toolkit', projectRoot);
38
- }
39
-
40
- function spawnApi(projectRoot) {
41
- const apiDevRunner = path.join(__dirname, 'api-dev-runner.js');
42
- console.log(t('dev.startingApi'));
43
- apiChild = spawn(process.execPath, [apiDevRunner], {
44
- stdio: 'inherit',
45
- cwd: projectRoot,
46
- env: {
47
- ...process.env,
48
- REACTPRESS_ORIGINAL_CWD: projectRoot,
49
- },
50
- });
51
-
52
- apiChild.on('close', (code) => {
53
- if (shuttingDown) {
54
- process.exit(code ?? 0);
55
- return;
56
- }
57
- if (webChild && !webChild.killed) webChild.kill('SIGINT');
58
- process.exit(code ?? 1);
59
- });
60
- }
61
-
62
- async function waitForApiReady(projectRoot) {
63
- const serverUrl = loadServerSiteUrl(projectRoot);
64
- const spinner = ora({
65
- text: t('dev.waitingApi', { url: serverUrl }),
66
- color: 'magenta',
67
- spinner: 'dots',
68
- }).start();
69
- const ready = await waitForHttp(serverUrl, API_READY_TIMEOUT_MS);
70
- if (!ready) {
71
- spinner.fail(t('dev.apiTimeout', { seconds: API_READY_TIMEOUT_MS / 1000 }));
72
- shutdown('SIGINT');
73
- process.exit(1);
74
- }
75
- spinner.succeed(t('dev.apiReady'));
76
- }
77
-
78
- function spawnClient(projectRoot) {
79
- webChild = spawn('pnpm', ['run', '--dir', './client', 'dev'], {
80
- stdio: 'inherit',
81
- shell: true,
82
- cwd: projectRoot,
83
- });
84
-
85
- const clientUrl = loadClientSiteUrl(projectRoot);
86
- waitForHttp(clientUrl, CLIENT_READY_TIMEOUT_MS).then((clientReady) => {
87
- if (clientReady) {
88
- printDevReadyBanner(projectRoot);
89
- } else {
90
- console.warn(
91
- t('dev.clientSlow', {
92
- seconds: CLIENT_READY_TIMEOUT_MS / 1000,
93
- url: clientUrl,
94
- })
95
- );
96
- }
97
- });
98
-
99
- webChild.on('close', (code) => {
100
- if (!shuttingDown) shutdown('SIGINT');
101
- process.exit(code ?? 0);
102
- });
103
- }
104
-
105
- async function startDevStack(projectRoot) {
106
- const includeClient = hasClient(projectRoot);
107
-
108
- spawnApi(projectRoot);
109
- await waitForApiReady(projectRoot);
110
- printDevReadyBanner(projectRoot, { apiOnly: !includeClient });
111
-
112
- if (!includeClient) {
113
- console.log(t('dev.standaloneHint'));
114
- return;
115
- }
116
- spawnClient(projectRoot);
117
- }
118
-
119
- async function runDev(projectRoot = ensureOriginalCwd()) {
120
- process.on('SIGINT', () => shutdown('SIGINT'));
121
- process.on('SIGTERM', () => shutdown('SIGTERM'));
122
-
123
- try {
124
- const result = await ensureProjectEnvironment(projectRoot);
125
- if (result.message) console.log(`[reactpress] ${result.message}`);
126
- } catch (err) {
127
- console.error(t('dev.envFailed'), err.message || err);
128
- console.error(formatDevFailureHint());
129
- process.exit(1);
130
- }
131
-
132
- await buildToolkit(projectRoot);
133
- await startDevStack(projectRoot);
134
- }
135
-
136
- module.exports = {
137
- runDev,
138
- buildToolkit,
139
- startDevStack,
140
- detectProjectType,
141
- };
package/lib/docker.js DELETED
@@ -1,275 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { spawn, execSync, spawnSync } = require('child_process');
4
- const ora = require('ora');
5
- const { ensureOriginalCwd } = require('./root');
6
- const { detectProjectType, hasClient } = require('./project-type');
7
- const { t } = require('./i18n');
8
-
9
- function isDockerRunning() {
10
- try {
11
- execSync('docker info', { stdio: 'ignore' });
12
- return true;
13
- } catch {
14
- return false;
15
- }
16
- }
17
-
18
- function pickDockerComposeCommand() {
19
- const v2 = spawnSync('docker', ['compose', 'version'], { stdio: 'ignore' });
20
- if (v2.status === 0) return { command: 'docker', baseArgs: ['compose'] };
21
-
22
- const v1 = spawnSync('docker-compose', ['version'], { stdio: 'ignore' });
23
- if (v1.status === 0) return { command: 'docker-compose', baseArgs: [] };
24
-
25
- return { command: 'docker', baseArgs: ['compose'] };
26
- }
27
-
28
- /**
29
- * Resolve which docker-compose file to use for the current project.
30
- *
31
- * - Monorepo checkouts use `docker-compose.dev.yml` at the repo root.
32
- * - Standalone projects use `.reactpress/docker-compose.yml` (managed by init).
33
- *
34
- * @returns {{ composeFile: string, cwd: string, type: 'monorepo' | 'standalone' }}
35
- */
36
- function resolveComposeContext(projectRoot) {
37
- const type = detectProjectType(projectRoot);
38
- if (type === 'monorepo') {
39
- const composeFile = path.join(projectRoot, 'docker-compose.dev.yml');
40
- if (fs.existsSync(composeFile)) {
41
- return { composeFile, cwd: projectRoot, type };
42
- }
43
- }
44
- const standaloneCompose = path.join(projectRoot, '.reactpress', 'docker-compose.yml');
45
- if (fs.existsSync(standaloneCompose)) {
46
- return { composeFile: standaloneCompose, cwd: path.dirname(standaloneCompose), type: 'standalone' };
47
- }
48
- const fallback = path.join(projectRoot, 'docker-compose.dev.yml');
49
- return { composeFile: fallback, cwd: projectRoot, type };
50
- }
51
-
52
- function runCompose(args, ctx, options = {}) {
53
- const { command, baseArgs } = pickDockerComposeCommand();
54
- return spawnSync(
55
- command,
56
- [...baseArgs, '-f', ctx.composeFile, ...args],
57
- { stdio: options.stdio ?? 'inherit', cwd: ctx.cwd, ...options }
58
- );
59
- }
60
-
61
- function stopDockerServices(projectRoot) {
62
- console.log(t('docker.stopping'));
63
- const ctx = resolveComposeContext(projectRoot);
64
- const result = runCompose(['down'], ctx);
65
- if (result.status !== 0) {
66
- console.error(t('docker.stopFailed'));
67
- throw new Error(t('docker.stopFailed'));
68
- }
69
- console.log(t('docker.stopped'));
70
- }
71
-
72
- function startDockerServices(projectRoot) {
73
- console.log(t('docker.starting'));
74
- if (!isDockerRunning()) {
75
- throw new Error(t('docker.notRunning'));
76
- }
77
- try {
78
- const { ensureNginxConfig } = require('./nginx');
79
- const { configPath, created } = ensureNginxConfig(projectRoot, { mode: 'dev' });
80
- if (created) {
81
- console.log(t('nginx.configCreated', { path: configPath }));
82
- }
83
- } catch (err) {
84
- console.warn(t('nginx.ensureWarn', { message: err.message || err }));
85
- }
86
- const ctx = resolveComposeContext(projectRoot);
87
- const result = runCompose(['up', '-d'], ctx);
88
- if (result.status !== 0) {
89
- throw new Error(t('docker.notRunning'));
90
- }
91
- console.log(t('docker.started'));
92
- }
93
-
94
- function resolveDbContainerName(ctx, projectRoot) {
95
- if (ctx.type === 'standalone') return 'reactpress_cli_db';
96
- return 'reactpress_db';
97
- }
98
-
99
- function resolveDbCredentialsFromEnv(projectRoot) {
100
- const envPath = path.join(projectRoot, '.env');
101
- let user = 'reactpress';
102
- let password = 'reactpress';
103
- try {
104
- const content = fs.readFileSync(envPath, 'utf8');
105
- const u = content.match(/^DB_USER=(.+)$/m);
106
- const p = content.match(/^(DB_PASSWD|DB_PASSWORD)=(.+)$/m);
107
- if (u) user = u[1].trim().replace(/^['"]|['"]$/g, '');
108
- if (p) password = p[2].trim().replace(/^['"]|['"]$/g, '');
109
- } catch {
110
- // ignore
111
- }
112
- return { user, password };
113
- }
114
-
115
- async function waitForMysql(projectRoot, maxAttempts = 30) {
116
- const ctx = resolveComposeContext(projectRoot);
117
- const container = resolveDbContainerName(ctx, projectRoot);
118
- const { user, password } = resolveDbCredentialsFromEnv(projectRoot);
119
-
120
- const spinner = ora({
121
- text: t('docker.waitingMysql'),
122
- color: 'magenta',
123
- spinner: 'dots',
124
- }).start();
125
-
126
- let attempts = 0;
127
- while (attempts < maxAttempts) {
128
- const probe = spawnSync(
129
- 'docker',
130
- ['exec', container, 'mysql', `-u${user}`, `-p${password}`, '-e', 'SELECT 1'],
131
- { stdio: 'ignore' }
132
- );
133
- if (probe.status === 0) {
134
- spinner.succeed(t('docker.mysqlReady'));
135
- return true;
136
- }
137
- attempts += 1;
138
- spinner.text = t('docker.waitingMysqlProgress', { attempts, max: maxAttempts });
139
- await new Promise((r) => setTimeout(r, 1000));
140
- }
141
- spinner.fail(t('docker.mysqlTimeout'));
142
- return false;
143
- }
144
-
145
- async function dockerStartWithDev(projectRoot) {
146
- startDockerServices(projectRoot);
147
- const ready = await waitForMysql(projectRoot);
148
- if (!ready) {
149
- throw new Error(t('docker.mysqlNotReady'));
150
- }
151
-
152
- if (!hasClient(projectRoot)) {
153
- console.log(t('dev.standaloneHint'));
154
- return;
155
- }
156
-
157
- const { buildToolkit } = require('./dev');
158
- await buildToolkit(projectRoot);
159
-
160
- const apiRunner = path.join(__dirname, 'api-dev-runner.js');
161
- console.log(t('docker.startDevStack'));
162
- console.log(t('docker.visitUrls'));
163
-
164
- return new Promise((resolve, reject) => {
165
- const child = spawn(
166
- 'npx',
167
- [
168
- 'concurrently',
169
- '-n',
170
- 'api,web',
171
- '-c',
172
- 'blue,green',
173
- `node "${apiRunner}"`,
174
- 'pnpm run --dir ./client dev',
175
- ],
176
- {
177
- stdio: 'inherit',
178
- shell: true,
179
- cwd: projectRoot,
180
- env: {
181
- ...process.env,
182
- REACTPRESS_ORIGINAL_CWD: projectRoot,
183
- },
184
- }
185
- );
186
-
187
- child.on('error', reject);
188
- child.on('close', (code) => {
189
- if (code !== 0) {
190
- reject(Object.assign(new Error(t('docker.devProcessExit', { code })), { exitCode: code }));
191
- return;
192
- }
193
- resolve();
194
- });
195
- });
196
- }
197
-
198
- /**
199
- * Run mysqldump inside the compose `db` container (MySQL image ships mysqldump).
200
- * Used when the host has no `mysqldump` binary but Docker DB is running.
201
- *
202
- * @returns {{ ok: true, stdout: string } | { ok: false, stderr: string }}
203
- */
204
- function mysqldumpFromDbContainer(projectRoot, { user, password, database }) {
205
- const ctx = resolveComposeContext(projectRoot);
206
- if (!fs.existsSync(ctx.composeFile)) {
207
- return { ok: false, stderr: 'compose file missing' };
208
- }
209
- if (!isDockerRunning()) {
210
- return { ok: false, stderr: 'docker not running' };
211
- }
212
- const container = resolveDbContainerName(ctx, projectRoot);
213
- const res = spawnSync(
214
- 'docker',
215
- ['exec', container, 'mysqldump', `-u${user}`, `-p${password}`, database],
216
- { encoding: 'utf8', maxBuffer: 50 * 1024 * 1024 }
217
- );
218
- if (res.error) {
219
- return { ok: false, stderr: res.error.message };
220
- }
221
- if (res.status !== 0) {
222
- return { ok: false, stderr: res.stderr || res.stdout || `exit ${res.status}` };
223
- }
224
- return { ok: true, stdout: res.stdout };
225
- }
226
-
227
- async function runDockerCommand(command, projectRoot = ensureOriginalCwd(), extraArgs = []) {
228
- const ctx = resolveComposeContext(projectRoot);
229
- switch (command) {
230
- case 'up':
231
- startDockerServices(projectRoot);
232
- await waitForMysql(projectRoot);
233
- return;
234
- case 'down':
235
- case 'stop':
236
- stopDockerServices(projectRoot);
237
- return;
238
- case 'start':
239
- await dockerStartWithDev(projectRoot);
240
- return;
241
- case 'restart':
242
- stopDockerServices(projectRoot);
243
- await new Promise((r) => setTimeout(r, 2000));
244
- startDockerServices(projectRoot);
245
- await waitForMysql(projectRoot);
246
- return;
247
- case 'status': {
248
- const res = runCompose(['ps'], ctx);
249
- if (res.status !== 0) {
250
- throw new Error(t('docker.unknownCommand', { command: 'ps' }));
251
- }
252
- return;
253
- }
254
- case 'logs': {
255
- const service = extraArgs[0];
256
- const args = ['logs', '-f'];
257
- if (service) args.push(service);
258
- runCompose(args, ctx);
259
- return;
260
- }
261
- default:
262
- throw new Error(t('docker.unknownCommand', { command }));
263
- }
264
- }
265
-
266
- module.exports = {
267
- runDockerCommand,
268
- startDockerServices,
269
- stopDockerServices,
270
- waitForMysql,
271
- isDockerRunning,
272
- resolveComposeContext,
273
- pickDockerComposeCommand,
274
- mysqldumpFromDbContainer,
275
- };