@fecommunity/reactpress 3.7.0 → 4.0.0-beta.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 (413) 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 +566 -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 +914 -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 +1192 -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 +95 -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 +378 -0
  272. package/out/ui/interactive.js.map +1 -0
  273. package/out/ui/prompts.d.ts +2 -0
  274. package/out/ui/prompts.d.ts.map +1 -0
  275. package/out/ui/prompts.js +91 -0
  276. package/out/ui/prompts.js.map +1 -0
  277. package/out/ui/theme.d.ts +2 -0
  278. package/out/ui/theme.d.ts.map +1 -0
  279. package/out/ui/theme.js +250 -0
  280. package/out/ui/theme.js.map +1 -0
  281. package/package.json +13 -7
  282. package/server/dist/common/api-messages.d.ts +9 -0
  283. package/server/dist/common/api-messages.js +9 -0
  284. package/server/dist/common/api-messages.js.map +1 -1
  285. package/server/dist/database/typeorm-options.d.ts +3 -0
  286. package/server/dist/database/typeorm-options.js +60 -0
  287. package/server/dist/database/typeorm-options.js.map +1 -0
  288. package/server/dist/modules/api-key/api-key.controller.js.map +1 -1
  289. package/server/dist/modules/api-key/api-key.entity.js.map +1 -1
  290. package/server/dist/modules/api-key/api-key.guard.js +2 -3
  291. package/server/dist/modules/api-key/api-key.guard.js.map +1 -1
  292. package/server/dist/modules/api-key/api-key.module.js.map +1 -1
  293. package/server/dist/modules/api-key/api-key.service.js +1 -1
  294. package/server/dist/modules/api-key/api-key.service.js.map +1 -1
  295. package/server/dist/modules/article/article-revision.entity.js +3 -3
  296. package/server/dist/modules/article/article-revision.entity.js.map +1 -1
  297. package/server/dist/modules/article/article-slug.util.d.ts +2 -0
  298. package/server/dist/modules/article/article-slug.util.js +19 -0
  299. package/server/dist/modules/article/article-slug.util.js.map +1 -0
  300. package/server/dist/modules/article/scheduled-publish.service.js.map +1 -1
  301. package/server/dist/modules/bootstrap/bootstrap.constants.d.ts +20 -0
  302. package/server/dist/modules/bootstrap/bootstrap.constants.js +171 -0
  303. package/server/dist/modules/bootstrap/bootstrap.constants.js.map +1 -0
  304. package/server/dist/modules/bootstrap/bootstrap.service.d.ts +22 -0
  305. package/server/dist/modules/bootstrap/bootstrap.service.js +183 -0
  306. package/server/dist/modules/bootstrap/bootstrap.service.js.map +1 -0
  307. package/server/dist/modules/bootstrap/install-locale.d.ts +2 -0
  308. package/server/dist/modules/bootstrap/install-locale.js +11 -0
  309. package/server/dist/modules/bootstrap/install-locale.js.map +1 -0
  310. package/server/dist/modules/extension/extension.module.d.ts +9 -0
  311. package/server/dist/modules/extension/extension.module.js +50 -0
  312. package/server/dist/modules/extension/extension.module.js.map +1 -0
  313. package/server/dist/modules/extension/plugin-loader.service.d.ts +12 -0
  314. package/server/dist/modules/extension/plugin-loader.service.js +96 -0
  315. package/server/dist/modules/extension/plugin-loader.service.js.map +1 -0
  316. package/server/dist/modules/extension/plugin-registry.bridge.d.ts +3 -0
  317. package/server/dist/modules/extension/plugin-registry.bridge.js +44 -0
  318. package/server/dist/modules/extension/plugin-registry.bridge.js.map +1 -0
  319. package/server/dist/modules/extension/plugin.controller.d.ts +22 -0
  320. package/server/dist/modules/extension/plugin.controller.js +155 -0
  321. package/server/dist/modules/extension/plugin.controller.js.map +1 -0
  322. package/server/dist/modules/extension/plugin.service.d.ts +52 -0
  323. package/server/dist/modules/extension/plugin.service.js +391 -0
  324. package/server/dist/modules/extension/plugin.service.js.map +1 -0
  325. package/server/dist/modules/extension/preview-draft.store.d.ts +13 -0
  326. package/server/dist/modules/extension/preview-draft.store.js +41 -0
  327. package/server/dist/modules/extension/preview-draft.store.js.map +1 -0
  328. package/server/dist/modules/extension/theme-registry.bridge.d.ts +56 -0
  329. package/server/dist/modules/extension/theme-registry.bridge.js +46 -0
  330. package/server/dist/modules/extension/theme-registry.bridge.js.map +1 -0
  331. package/server/dist/modules/extension/theme.controller.d.ts +66 -0
  332. package/server/dist/modules/extension/theme.controller.js +301 -0
  333. package/server/dist/modules/extension/theme.controller.js.map +1 -0
  334. package/server/dist/modules/extension/theme.service.d.ts +140 -0
  335. package/server/dist/modules/extension/theme.service.js +1039 -0
  336. package/server/dist/modules/extension/theme.service.js.map +1 -0
  337. package/server/dist/modules/file/file-optimization.controller.d.ts +12 -0
  338. package/server/dist/modules/file/file-optimization.controller.js +79 -0
  339. package/server/dist/modules/file/file-optimization.controller.js.map +1 -0
  340. package/server/dist/modules/file/file-optimization.service.d.ts +36 -0
  341. package/server/dist/modules/file/file-optimization.service.js +385 -0
  342. package/server/dist/modules/file/file-optimization.service.js.map +1 -0
  343. package/server/dist/modules/file/file-optimization.types.d.ts +66 -0
  344. package/server/dist/modules/file/file-optimization.types.js +5 -0
  345. package/server/dist/modules/file/file-optimization.types.js.map +1 -0
  346. package/server/dist/modules/file/image-optimizer-plugin.guard.d.ts +7 -0
  347. package/server/dist/modules/file/image-optimizer-plugin.guard.js +33 -0
  348. package/server/dist/modules/file/image-optimizer-plugin.guard.js.map +1 -0
  349. package/server/dist/modules/health/health.controller.js +2 -4
  350. package/server/dist/modules/health/health.controller.js.map +1 -1
  351. package/server/dist/modules/health/health.module.js.map +1 -1
  352. package/server/dist/modules/hook/hook.module.d.ts +2 -0
  353. package/server/dist/modules/hook/hook.module.js +22 -0
  354. package/server/dist/modules/hook/hook.module.js.map +1 -0
  355. package/server/dist/modules/hook/hook.service.d.ts +26 -0
  356. package/server/dist/modules/hook/hook.service.js +105 -0
  357. package/server/dist/modules/hook/hook.service.js.map +1 -0
  358. package/server/dist/modules/webhook/webhook.controller.js.map +1 -1
  359. package/server/dist/modules/webhook/webhook.entity.js.map +1 -1
  360. package/server/dist/modules/webhook/webhook.module.js.map +1 -1
  361. package/server/dist/modules/webhook/webhook.service.d.ts +1 -1
  362. package/server/dist/modules/webhook/webhook.service.js +5 -2
  363. package/server/dist/modules/webhook/webhook.service.js.map +1 -1
  364. package/server/dist/node-polyfills.d.ts +18 -0
  365. package/server/dist/node-polyfills.js +24 -0
  366. package/server/dist/node-polyfills.js.map +1 -0
  367. package/server/dist/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  368. package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  369. package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  370. package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  371. package/server/dist/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
  372. package/server/dist/tsconfig.tsbuildinfo +1 -0
  373. package/server/dist/utils/image-processor.util.d.ts +23 -0
  374. package/server/dist/utils/image-processor.util.js +88 -0
  375. package/server/dist/utils/image-processor.util.js.map +1 -0
  376. package/server/dist/utils/local-api-quiet.util.d.ts +1 -0
  377. package/server/dist/utils/local-api-quiet.util.js +8 -0
  378. package/server/dist/utils/local-api-quiet.util.js.map +1 -0
  379. package/server/dist/utils/project-root.util.d.ts +2 -0
  380. package/server/dist/utils/project-root.util.js +42 -0
  381. package/server/dist/utils/project-root.util.js.map +1 -0
  382. package/server/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
  383. package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
  384. package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
  385. package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
  386. package/server/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
  387. package/templates/config.local.json +13 -0
  388. package/templates/env.local.default +10 -0
  389. package/templates/theme-catalog.json +27 -0
  390. package/lib/api-dev.js +0 -89
  391. package/lib/bootstrap.js +0 -114
  392. package/lib/build.js +0 -162
  393. package/lib/db-backup.js +0 -67
  394. package/lib/dev-banner.js +0 -72
  395. package/lib/dev.js +0 -141
  396. package/lib/docker.js +0 -275
  397. package/lib/doctor.js +0 -266
  398. package/lib/http.js +0 -182
  399. package/lib/i18n/index.js +0 -32
  400. package/lib/i18n/strings.js +0 -846
  401. package/lib/lifecycle.js +0 -190
  402. package/lib/nginx.js +0 -342
  403. package/lib/paths.js +0 -108
  404. package/lib/pm2.js +0 -32
  405. package/lib/process.js +0 -45
  406. package/lib/project-type.js +0 -72
  407. package/lib/publish.js +0 -968
  408. package/lib/root.js +0 -88
  409. package/lib/spawn.js +0 -92
  410. package/lib/status.js +0 -132
  411. package/ui/banner.js +0 -441
  412. package/ui/interactive.js +0 -380
  413. package/ui/theme.js +0 -265
@@ -4,7 +4,7 @@
4
4
  * @deprecated 3.0 起请使用 `reactpress`(@fecommunity/reactpress)。3.1 将移除此 bin。
5
5
  */
6
6
  const chalk = require('chalk');
7
- const { t } = require('../lib/i18n');
7
+ const { t } = require('../out/lib/i18n');
8
8
 
9
9
  function mapLegacyArgv(argv) {
10
10
  const [cmd, ...rest] = argv;
@@ -16,11 +16,7 @@ function mapLegacyArgv(argv) {
16
16
  }
17
17
 
18
18
  if (!process.env.REACTPRESS_SUPPRESS_DEPRECATION) {
19
- console.warn(
20
- chalk.yellow(
21
- t('shim.deprecated')
22
- )
23
- );
19
+ console.warn(chalk.yellow(t('shim.deprecated')));
24
20
  }
25
21
 
26
22
  const mapped = mapLegacyArgv(process.argv.slice(2));
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('../out/bin/reactpress-theme-client.js');
package/bin/reactpress.js CHANGED
@@ -1,381 +1,2 @@
1
1
  #!/usr/bin/env node
2
-
3
- /**
4
- * ReactPress unified CLI — init, dev, build, server, docker, publish.
5
- * Run without arguments for an interactive menu (Claude Code–style).
6
- */
7
-
8
- const { Command } = require('commander');
9
- const path = require('path');
10
- const chalk = require('chalk');
11
- const { brand, divider } = require('../ui/theme');
12
- const { ensureOriginalCwd } = require('../lib/root');
13
- const { ensureProjectEnvironment, initMonorepoProject } = require('../lib/bootstrap');
14
- const { runDev } = require('../lib/dev');
15
- const { runApiDev } = require('../lib/api-dev');
16
- const { runLifecycleCommand } = require('../lib/lifecycle');
17
- const { runDockerCommand } = require('../lib/docker');
18
- const { runNginxCommand } = require('../lib/nginx');
19
- const { printUnifiedStatus } = require('../lib/status');
20
- const { runDoctor } = require('../lib/doctor');
21
- const { runDbBackup } = require('../lib/db-backup');
22
- const { runBuild } = require('../lib/build');
23
- const { startApiWithPm2 } = require('../lib/pm2');
24
- const { runNodeScript, runReactpressCli } = require('../lib/spawn');
25
- const { getClientBin } = require('../lib/paths');
26
- const { runInteractiveLoop } = require('../ui/interactive');
27
- const { t } = require('../lib/i18n');
28
-
29
- const rootPkg = require(path.join(__dirname, '..', 'package.json'));
30
-
31
- const program = new Command();
32
-
33
- program
34
- .name('reactpress')
35
- .description(t('cli.description'))
36
- .version(rootPkg.version);
37
-
38
- program
39
- .command('init')
40
- .description(t('cli.init.description'))
41
- .argument('[directory]', t('cli.init.directory'), '.')
42
- .option('-f, --force', t('cli.init.force'))
43
- .action(async (directory, options) => {
44
- const projectRoot = path.resolve(directory);
45
- process.env.REACTPRESS_ORIGINAL_CWD = projectRoot;
46
- const { isMonorepoCheckout } = require('../lib/bootstrap');
47
- if (isMonorepoCheckout(projectRoot)) {
48
- const result = await initMonorepoProject(projectRoot, { force: !!options.force });
49
- console.log(`[reactpress] ${result.message}`);
50
- process.exit(result.ok ? 0 : 1);
51
- return;
52
- }
53
- const args = ['init', directory];
54
- if (options.force) args.push('--force');
55
- runReactpressCli(args, { cwd: projectRoot });
56
- });
57
-
58
- program
59
- .command('dev')
60
- .description(t('cli.dev.description'))
61
- .option('--api-only', t('cli.dev.apiOnly'))
62
- .option('--client-only', t('cli.dev.clientOnly'))
63
- .action(async (options) => {
64
- const projectRoot = ensureOriginalCwd();
65
- try {
66
- if (options.clientOnly) {
67
- await runNodeScript(getClientBin(), [], { cwd: projectRoot });
68
- return;
69
- }
70
- if (options.apiOnly) {
71
- await runApiDev(projectRoot);
72
- return;
73
- }
74
- await runDev(projectRoot);
75
- } catch (err) {
76
- console.error(chalk.red('[reactpress]'), err.message || err);
77
- process.exit(err.exitCode ?? 1);
78
- }
79
- });
80
-
81
- const serverCmd = program.command('server').description(t('cli.server.description'));
82
-
83
- serverCmd
84
- .command('start')
85
- .description(t('cli.server.start.description'))
86
- .option('--pm2', t('cli.server.start.pm2'))
87
- .option('--bg', t('cli.server.start.bg'))
88
- .action(async (options) => {
89
- const projectRoot = ensureOriginalCwd();
90
- try {
91
- if (options.pm2) {
92
- await startApiWithPm2(projectRoot);
93
- return;
94
- }
95
- const cmd = options.bg ? 'start:bg' : 'start';
96
- const code = await runLifecycleCommand(cmd, projectRoot);
97
- process.exit(code ?? 0);
98
- } catch (err) {
99
- console.error(chalk.red('[reactpress]'), err.message || err);
100
- process.exit(1);
101
- }
102
- });
103
-
104
- serverCmd.command('stop').description(t('cli.server.stop')).action(async () => {
105
- const code = await runLifecycleCommand('stop', ensureOriginalCwd());
106
- process.exit(code ?? 0);
107
- });
108
-
109
- serverCmd.command('restart').description(t('cli.server.restart')).action(async () => {
110
- const code = await runLifecycleCommand('restart', ensureOriginalCwd());
111
- process.exit(code ?? 0);
112
- });
113
-
114
- serverCmd.command('status').description(t('cli.server.status')).action(async () => {
115
- await runLifecycleCommand('status', ensureOriginalCwd());
116
- });
117
-
118
- const clientCmd = program.command('client').description(t('cli.client.description'));
119
-
120
- clientCmd
121
- .command('start')
122
- .description(t('cli.client.start'))
123
- .option('--pm2', t('cli.client.start.pm2'))
124
- .action(async (options) => {
125
- const args = options.pm2 ? ['--pm2'] : [];
126
- await runNodeScript(getClientBin(), args, { cwd: ensureOriginalCwd() });
127
- });
128
-
129
- program
130
- .command('build')
131
- .description(t('cli.build.description'))
132
- .option('-t, --target <target>', t('cli.build.target'), 'all')
133
- .action(async (options) => {
134
- try {
135
- await runBuild(options.target, ensureOriginalCwd());
136
- } catch (err) {
137
- console.error(chalk.red('[reactpress]'), err.message || err);
138
- process.exit(1);
139
- }
140
- });
141
-
142
- const dockerCmd = program.command('docker').description(t('cli.docker.description'));
143
-
144
- dockerCmd
145
- .command('up')
146
- .description(t('cli.docker.up'))
147
- .action(async () => {
148
- await runDockerCommand('up', ensureOriginalCwd());
149
- });
150
-
151
- dockerCmd
152
- .command('down')
153
- .alias('stop')
154
- .description(t('cli.docker.down'))
155
- .action(async () => {
156
- await runDockerCommand('down', ensureOriginalCwd());
157
- });
158
-
159
- dockerCmd
160
- .command('start')
161
- .description(t('cli.docker.start'))
162
- .action(async () => {
163
- await runDockerCommand('start', ensureOriginalCwd());
164
- });
165
-
166
- dockerCmd.command('restart').description(t('cli.docker.restart')).action(async () => {
167
- await runDockerCommand('restart', ensureOriginalCwd());
168
- });
169
-
170
- dockerCmd.command('status').description(t('cli.docker.status')).action(async () => {
171
- await runDockerCommand('status', ensureOriginalCwd());
172
- });
173
-
174
- dockerCmd
175
- .command('logs [service]')
176
- .description(t('cli.docker.logs'))
177
- .action(async (service) => {
178
- await runDockerCommand('logs', ensureOriginalCwd(), service ? [service] : []);
179
- });
180
-
181
- const nginxCmd = program.command('nginx').description(t('cli.nginx.description'));
182
-
183
- function nginxActionOptions(cmd) {
184
- return cmd.option('--prod', t('cli.nginx.prod')).option('-f, --force', t('cli.nginx.force'));
185
- }
186
-
187
- nginxActionOptions(nginxCmd.command('ensure').description(t('cli.nginx.ensure'))).action(async (options) => {
188
- try {
189
- await runNginxCommand('ensure', ensureOriginalCwd(), [], options);
190
- } catch (err) {
191
- console.error(chalk.red('[reactpress]'), err.message || err);
192
- process.exit(1);
193
- }
194
- });
195
-
196
- nginxActionOptions(nginxCmd.command('up').description(t('cli.nginx.up'))).action(async (options) => {
197
- try {
198
- await runNginxCommand('up', ensureOriginalCwd(), [], options);
199
- } catch (err) {
200
- console.error(chalk.red('[reactpress]'), err.message || err);
201
- process.exit(1);
202
- }
203
- });
204
-
205
- nginxCmd
206
- .command('down')
207
- .alias('stop')
208
- .description(t('cli.nginx.down'))
209
- .option('--prod', t('cli.nginx.prod'))
210
- .action(async (options) => {
211
- try {
212
- await runNginxCommand('down', ensureOriginalCwd(), [], options);
213
- } catch (err) {
214
- console.error(chalk.red('[reactpress]'), err.message || err);
215
- process.exit(1);
216
- }
217
- });
218
-
219
- nginxActionOptions(nginxCmd.command('restart').description(t('cli.nginx.restart'))).action(async (options) => {
220
- try {
221
- await runNginxCommand('restart', ensureOriginalCwd(), [], options);
222
- } catch (err) {
223
- console.error(chalk.red('[reactpress]'), err.message || err);
224
- process.exit(1);
225
- }
226
- });
227
-
228
- nginxCmd
229
- .command('status')
230
- .description(t('cli.nginx.status'))
231
- .option('--prod', t('cli.nginx.prod'))
232
- .action(async (options) => {
233
- try {
234
- await runNginxCommand('status', ensureOriginalCwd(), [], options);
235
- } catch (err) {
236
- console.error(chalk.red('[reactpress]'), err.message || err);
237
- process.exit(1);
238
- }
239
- });
240
-
241
- nginxCmd.command('logs').description(t('cli.nginx.logs')).action(async () => {
242
- try {
243
- await runNginxCommand('logs', ensureOriginalCwd());
244
- } catch (err) {
245
- console.error(chalk.red('[reactpress]'), err.message || err);
246
- process.exit(1);
247
- }
248
- });
249
-
250
- nginxCmd.command('test').description(t('cli.nginx.test')).action(async () => {
251
- try {
252
- await runNginxCommand('test', ensureOriginalCwd());
253
- } catch (err) {
254
- console.error(chalk.red('[reactpress]'), err.message || err);
255
- process.exit(1);
256
- }
257
- });
258
-
259
- nginxCmd.command('reload').description(t('cli.nginx.reload')).action(async () => {
260
- try {
261
- await runNginxCommand('reload', ensureOriginalCwd());
262
- } catch (err) {
263
- console.error(chalk.red('[reactpress]'), err.message || err);
264
- process.exit(1);
265
- }
266
- });
267
-
268
- nginxCmd.command('open').description(t('cli.nginx.open')).action(async () => {
269
- try {
270
- await runNginxCommand('open', ensureOriginalCwd());
271
- } catch (err) {
272
- console.error(chalk.red('[reactpress]'), err.message || err);
273
- process.exit(1);
274
- }
275
- });
276
-
277
- program
278
- .command('status')
279
- .description(t('cli.status.description'))
280
- .action(async () => {
281
- await printUnifiedStatus(ensureOriginalCwd());
282
- });
283
-
284
- program
285
- .command('doctor')
286
- .description(t('cli.doctor.description'))
287
- .action(async () => {
288
- const code = await runDoctor(ensureOriginalCwd());
289
- process.exit(code);
290
- });
291
-
292
- const dbCmd = program.command('db').description(t('cli.db.description'));
293
-
294
- dbCmd
295
- .command('backup')
296
- .description(t('cli.db.backup'))
297
- .option('-o, --output <file>', t('cli.db.backup.output'))
298
- .action(async (options) => {
299
- try {
300
- await runDbBackup(ensureOriginalCwd(), options.output);
301
- } catch (err) {
302
- console.error(chalk.red('[reactpress]'), err.message || err);
303
- process.exit(1);
304
- }
305
- });
306
-
307
- program
308
- .command('publish')
309
- .description(t('cli.publish.description'))
310
- .option('--build', t('cli.publish.build'))
311
- .option('--publish', t('cli.publish.publish'))
312
- .action(async (options) => {
313
- try {
314
- const publish = require('../lib/publish');
315
- if (options.build) {
316
- await publish.buildPackages();
317
- return;
318
- }
319
- await publish.publishPackages();
320
- } catch (err) {
321
- console.error(chalk.red('[reactpress]'), err.message || err);
322
- process.exit(1);
323
- }
324
- });
325
-
326
- program
327
- .command('start')
328
- .description(t('cli.start.description'))
329
- .action(async () => {
330
- const projectRoot = ensureOriginalCwd();
331
- const { hasClient } = require('../lib/project-type');
332
- const code = await runLifecycleCommand('start', projectRoot);
333
- if (code !== 0) process.exit(code);
334
- if (!hasClient(projectRoot)) {
335
- console.log(t('dev.standaloneHint'));
336
- return;
337
- }
338
- const { spawn } = require('child_process');
339
- const child = spawn('pnpm', ['run', '--dir', './client', 'start'], {
340
- stdio: 'inherit',
341
- shell: true,
342
- cwd: projectRoot,
343
- });
344
- child.on('close', (c) => process.exit(c ?? 0));
345
- });
346
-
347
- program.on('--help', () => {
348
- console.log('');
349
- console.log(brand.bold(t('cli.help.examples')));
350
- console.log(divider(40));
351
- const lines = [
352
- t('cli.help.interactive'),
353
- t('cli.help.dev'),
354
- t('cli.help.init'),
355
- t('cli.help.server'),
356
- t('cli.help.status'),
357
- t('cli.help.doctor'),
358
- t('cli.help.docker'),
359
- t('cli.help.nginx'),
360
- t('cli.help.build'),
361
- t('cli.help.publish'),
362
- ];
363
- for (const line of lines) {
364
- console.log(brand.dim(line));
365
- }
366
- console.log('');
367
- });
368
-
369
- async function main() {
370
- const argv = process.argv.slice(2);
371
- if (argv.length === 0) {
372
- await runInteractiveLoop();
373
- return;
374
- }
375
- program.parse(process.argv);
376
- }
377
-
378
- main().catch((err) => {
379
- console.error(chalk.red('[reactpress]'), err.message || err);
380
- process.exit(1);
381
- });
2
+ require('../out/bin/reactpress.js');
@@ -0,0 +1 @@
1
+ b524906a4e938071df11ce580297a66affddfc51a54cd4ea08dadd28648bdfb3
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=reactpress-cli-shim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactpress-cli-shim.d.ts","sourceRoot":"","sources":["../../src/bin/reactpress-cli-shim.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ // @ts-nocheck
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ /**
6
+ * @deprecated 3.0 起请使用 `reactpress`(@fecommunity/reactpress)。3.1 将移除此 bin。
7
+ */
8
+ const chalk = require('chalk');
9
+ const { t } = require('../lib/i18n');
10
+ function mapLegacyArgv(argv) {
11
+ const [cmd, ...rest] = argv;
12
+ if (cmd === 'start')
13
+ return ['server', 'start', ...rest];
14
+ if (cmd === 'stop')
15
+ return ['server', 'stop', ...rest];
16
+ if (cmd === 'restart')
17
+ return ['server', 'restart', ...rest];
18
+ if (cmd === 'status')
19
+ return ['server', 'status', ...rest];
20
+ return argv;
21
+ }
22
+ if (!process.env.REACTPRESS_SUPPRESS_DEPRECATION) {
23
+ console.warn(chalk.yellow(t('shim.deprecated')));
24
+ }
25
+ const mapped = mapLegacyArgv(process.argv.slice(2));
26
+ process.argv = [process.argv[0], process.argv[1], ...mapped];
27
+ require('./reactpress.js');
28
+ //# sourceMappingURL=reactpress-cli-shim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactpress-cli-shim.js","sourceRoot":"","sources":["../../src/bin/reactpress-cli-shim.ts"],"names":[],"mappings":";;AACA,cAAc;;AAEd;;GAEG;AACH,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAErC,SAAS,aAAa,CAAC,IAAI;IACzB,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC5B,IAAI,GAAG,KAAK,OAAO;QAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACzD,IAAI,GAAG,KAAK,MAAM;QAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACvD,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IAC7D,IAAI,GAAG,KAAK,QAAQ;QAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,CAAC;IACjD,OAAO,CAAC,IAAI,CACV,KAAK,CAAC,MAAM,CACV,CAAC,CAAC,iBAAiB,CAAC,CACrB,CACF,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpD,OAAO,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;AAC7D,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=reactpress-theme-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactpress-theme-client.d.ts","sourceRoot":"","sources":["../../src/bin/reactpress-theme-client.ts"],"names":[],"mappings":""}
@@ -0,0 +1,113 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ // @ts-nocheck
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ /**
6
+ * Generic ReactPress theme client launcher (for themes without bin/reactpress-client.js).
7
+ * Set REACTPRESS_THEME_DIR to the active theme package root.
8
+ */
9
+ const path = require('path');
10
+ const fs = require('fs');
11
+ const { spawn, spawnSync } = require('child_process');
12
+ const { hasUsableProductionBuild } = require('../lib/theme-prod');
13
+ const { getPm2ClientMemoryRestart, resolveBuildNodeEnv } = require('../lib/prod-memory');
14
+ const { readActiveThemeManifest } = require('../lib/theme-runtime');
15
+ const originalCwd = process.env.REACTPRESS_ORIGINAL_CWD || process.cwd();
16
+ const args = process.argv.slice(2);
17
+ const usePM2 = args.includes('--pm2');
18
+ const clientDir = process.env.REACTPRESS_THEME_DIR
19
+ ? path.resolve(process.env.REACTPRESS_THEME_DIR)
20
+ : null;
21
+ if (!clientDir || !fs.existsSync(path.join(clientDir, 'package.json'))) {
22
+ console.error('[ReactPress Client] REACTPRESS_THEME_DIR must point to a theme package');
23
+ process.exit(1);
24
+ }
25
+ const nextDir = path.join(clientDir, '.next');
26
+ const startScript = fs.existsSync(path.join(clientDir, 'server.js')) ? 'server.js' : null;
27
+ function runStartCommand() {
28
+ if (startScript) {
29
+ return ['node', [startScript]];
30
+ }
31
+ return ['npm', ['run', 'start']];
32
+ }
33
+ function ensureBuilt() {
34
+ const { activeTheme } = readActiveThemeManifest(originalCwd);
35
+ const themeId = process.env.REACTPRESS_THEME_ID || activeTheme || path.basename(clientDir);
36
+ if (hasUsableProductionBuild(clientDir, themeId))
37
+ return;
38
+ console.log('[ReactPress Client] Client not built yet. Building…');
39
+ const build = spawnSync('pnpm', ['run', 'build'], {
40
+ stdio: 'inherit',
41
+ cwd: clientDir,
42
+ env: resolveBuildNodeEnv({ ...process.env, REACTPRESS_BUILD_ACTIVE: '1' }),
43
+ });
44
+ if (build.status !== 0)
45
+ process.exit(build.status || 1);
46
+ }
47
+ function startWithPm2() {
48
+ ensureBuilt();
49
+ const [cmd, cmdArgs] = runStartCommand();
50
+ const visitorPort = process.env.CLIENT_PORT || process.env.PORT || '3001';
51
+ const apiPort = process.env.SERVER_PORT || '3002';
52
+ const nginxEntry = (process.env.REACTPRESS_NGINX_ENTRY_URL || process.env.NGINX_ENTRY_URL || '')
53
+ .replace(/\/$/, '');
54
+ const pm2Env = {
55
+ ...process.env,
56
+ NODE_ENV: 'production',
57
+ PORT: String(visitorPort),
58
+ CLIENT_PORT: String(visitorPort),
59
+ REACTPRESS_ORIGINAL_CWD: originalCwd,
60
+ REACTPRESS_THEME_DIR: clientDir,
61
+ REACTPRESS_API_URL: process.env.REACTPRESS_API_URL || `http://127.0.0.1:${apiPort}/api`,
62
+ SERVER_API_URL: process.env.SERVER_API_URL || `http://127.0.0.1:${apiPort}/api`,
63
+ NEXT_PUBLIC_REACTPRESS_API_URL: process.env.NEXT_PUBLIC_REACTPRESS_API_URL ||
64
+ (nginxEntry ? `${nginxEntry}/api` : `http://127.0.0.1:${apiPort}/api`),
65
+ ...(nginxEntry
66
+ ? { REACTPRESS_NGINX_ENTRY_URL: nginxEntry, NGINX_ENTRY_URL: nginxEntry }
67
+ : { REACTPRESS_SKIP_DEV_PORT_REDIRECT: '1' }),
68
+ };
69
+ const pm2Mem = getPm2ClientMemoryRestart();
70
+ const pm2Args = cmd === 'node'
71
+ ? [
72
+ 'start',
73
+ cmd,
74
+ '--name',
75
+ 'reactpress-client',
76
+ '--update-env',
77
+ '--max-memory-restart',
78
+ pm2Mem,
79
+ '--',
80
+ ...cmdArgs,
81
+ ]
82
+ : [
83
+ 'start',
84
+ cmd,
85
+ '--name',
86
+ 'reactpress-client',
87
+ '--update-env',
88
+ '--max-memory-restart',
89
+ pm2Mem,
90
+ '--',
91
+ ...cmdArgs,
92
+ ];
93
+ const child = spawn('pm2', pm2Args, { stdio: 'inherit', cwd: clientDir, env: pm2Env });
94
+ child.on('close', (code) => process.exit(code ?? 0));
95
+ child.on('error', (err) => {
96
+ console.error('[ReactPress Client] PM2 failed:', err);
97
+ process.exit(1);
98
+ });
99
+ }
100
+ function startWithNode() {
101
+ ensureBuilt();
102
+ process.chdir(clientDir);
103
+ const [cmd, cmdArgs] = runStartCommand();
104
+ const child = spawn(cmd, cmdArgs, { stdio: 'inherit', cwd: clientDir, env: process.env });
105
+ child.on('close', (code) => process.exit(code ?? 0));
106
+ }
107
+ if (usePM2) {
108
+ startWithPm2();
109
+ }
110
+ else {
111
+ startWithNode();
112
+ }
113
+ //# sourceMappingURL=reactpress-theme-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactpress-theme-client.js","sourceRoot":"","sources":["../../src/bin/reactpress-theme-client.ts"],"names":[],"mappings":";;AACA,cAAc;;AAEd;;;GAGG;AAEH,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACtD,MAAM,EAAE,wBAAwB,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAClE,MAAM,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACzF,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAEpE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACzE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAEtC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB;IAChD,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAChD,CAAC,CAAC,IAAI,CAAC;AAET,IAAI,CAAC,SAAS,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACxF,OAAO,CAAC,IAAI,CAAC,CA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,CAAC;IACN,aAAa,EAAE,CAAC;AAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=reactpress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactpress.d.ts","sourceRoot":"","sources":["../../src/bin/reactpress.ts"],"names":[],"mappings":""}