diff --git a/CHANGELOG.md b/CHANGELOG.md index 8413d7db..070bddcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,308 +1,264 @@ # Changelog -## [4.0.0](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.18...v4.0.0) (unreleased) +## [4.0.0](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.18...v4.0.0) (2026-08-09) -> **Stable release** — promotes 4.x from `beta` to `latest` on npm. Install with `npm i -g @fecommunity/reactpress`. +> **Stable release** — promotes 4.x from `beta` to `latest` on npm ([#88](https://github.com/fecommunity/reactpress/issues/88)). Install with `npm i -g @fecommunity/reactpress`. ### Publishing & packaging -* npm metadata: brand-aligned descriptions, keywords, homepage, and README for CLI, toolkit, web, and server -* toolkit: ship `README.md` and `LICENSE` in npm tarball; license unified to MIT -* web: ship `LICENSE` in npm tarball -* server: remove invalid `types` entry; add `publishConfig`; align `engines` to Node 18+ -* **Desktop**: GitHub Actions matrix build (macOS / Windows / Linux) uploads installers to Releases -* **Docs**: canonical URL `https://docs.gaoredu.com`; desktop download guide; removed legacy 2.x / split-package pages +- npm metadata: brand-aligned descriptions, keywords, homepage, and README for CLI, toolkit, web, and server +- toolkit: ship `README.md` and `LICENSE` in npm tarball; license unified to MIT +- web: ship `LICENSE` in npm tarball +- server: remove invalid `types` entry; add `publishConfig`; align `engines` to Node 18+ +- **Desktop**: GitHub Actions matrix build (macOS / Windows / Linux) uploads installers to Releases +- **Docs**: canonical URL `https://docs.gaoredu.com`; desktop download guide; removed legacy 2.x / split-package pages +- **Release**: docs, README, Admin CLI snippet, and docs site default to `@latest` / 4.0.0; publish CLI supports `promote to stable` ### Upgrade from 3.x -* Run `npm i -g @fecommunity/reactpress@beta` (or `@latest` after stable publish) -* Use `reactpress init` in a new directory; see [migration guide](./docs/migration-3-to-4.md) +- Run `npm i -g @fecommunity/reactpress` (npm `@latest`) +- Use `reactpress init` in a new directory; see [migration guide](./docs/migration-3-to-4.md) --- # [4.0.0-beta.18](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.0...v4.0.0-beta.18) (2026-07-12) -> **Pre-release** — current npm `@beta` tag. Install: `npm i -g @fecommunity/reactpress@beta`. +> **Pre-release** — npm `@beta` tag at the time. Install: `npm i -g @fecommunity/reactpress@beta`. ### CLI & packaging -* Zero-dependency mode: bundled toolkit and server runtime in the CLI tarball -* Theme API proxy patching and improved `reactpress theme install` -* Enhanced logging, `doctor`, and admin lifecycle commands +- Zero-dependency mode: bundled toolkit and server runtime in the CLI tarball +- Theme API proxy patching and improved `reactpress theme install` +- Enhanced logging, `doctor`, and admin lifecycle commands ### Desktop & CI -* Reusable GitHub Actions workflow for cross-platform desktop installers (macOS / Windows / Linux) -* Desktop builds attach to GitHub Releases on publish +- Reusable GitHub Actions workflow for cross-platform desktop installers (macOS / Windows / Linux) +- Desktop builds attach to GitHub Releases on publish ### Docs & README -* Docs site: Algolia DocSearch, changelog version sidebar, hero npm version tags (`@beta` / `@latest`) -* README and admin demo media refresh; star history charts moved under `public/` -* Installation guide clarifies `@beta` vs `@latest`; canonical docs at `https://docs.gaoredu.com` +- Docs site: Algolia DocSearch, changelog version sidebar, hero npm version tags (`@beta` / `@latest`) +- README and admin demo media refresh; star history charts moved under `public/` +- Installation guide clarifies `@beta` vs `@latest`; canonical docs at `https://docs.gaoredu.com` --- # [4.0.0-beta.0](https://github.com/fecommunity/reactpress/compare/v3.7.0...v4.0.0-beta.0) (2026-06-27) -> **Pre-release** — install with `npm i -g @fecommunity/reactpress@beta` for testing. Final 4.0.0 follows after validation. +> **Pre-release** — install with `npm i -g @fecommunity/reactpress@beta` for testing. Final 4.0.0 followed after validation. ### Plugin System -* **Hook + manifest**: `plugin.json` lifecycle (install / activate / config / hot reload); `HookService` with filters and actions -* **Admin slots**: `AdminSlot` + `PluginAdminProvider`; SEO plugin integrates article editor -* **Built-in plugins**: `hello-world` (auto summary), `seo` (slug, keywords, meta description), `image-optimizer` (legacy media WebP batch optimization) -* **CLI**: `reactpress plugin list` / `install`; `pnpm build:plugins` in full build pipeline -* **Security**: manifest JSON Schema validation, module path constraints, Ajv config validation +- **Hook + manifest**: `plugin.json` lifecycle (install / activate / config / hot reload); `HookService` with filters and actions +- **Admin slots**: `AdminSlot` + `PluginAdminProvider`; SEO plugin integrates article editor +- **Built-in plugins**: `hello-world` (auto summary), `seo` (slug, keywords, meta description), `image-optimizer` (legacy media WebP batch optimization) +- **CLI**: `reactpress plugin list` / `install`; `pnpm build:plugins` in full build pipeline +- **Security**: manifest JSON Schema validation, module path constraints, Ajv config validation ### Desktop Client -* **Electron shell**: loads same Admin SPA (`web/dist`); `pnpm dev:desktop` / `pnpm build:desktop` -* **Local mode**: embedded SQLite API (default port `13102`), no Docker/MySQL required -* **Remote mode**: connect to existing ReactPress API -* **Sync**: push articles, pages, and settings from local to remote site +- **Electron shell**: loads same Admin SPA (`web/dist`); `pnpm dev:desktop` / `pnpm build:desktop` +- **Local mode**: embedded SQLite API (default port `13102`), no Docker/MySQL required +- **Remote mode**: connect to existing ReactPress API +- **Sync**: push articles, pages, and settings from local to remote site ### Themes & Docs -* **Theme catalog**: npm anchor `theme-starter`; enhanced theme management; removed deprecated bundled themes -* **hello-world**: updated README aligned with Pages Router + `createThemeApp` -* **Docs**: ARCHITECTURE / design sync; migration 3→4; ReactPress 4.0 guide +- **Theme catalog**: npm anchor `theme-starter`; enhanced theme management; removed deprecated bundled themes +- **hello-world**: updated README aligned with Pages Router + `createThemeApp` +- **Docs**: ARCHITECTURE / design sync; migration 3→4; ReactPress 4.0 guide # [3.7.0](https://github.com/fecommunity/reactpress/compare/v3.6.0...v3.7.0) (2026-06-23) ### Security -* **SQL injection**: whitelist filter column names in public list API `findAll()` handlers ([GHSA-wmw4-mw6x-6vfm](https://github.com/fecommunity/reactpress/security/advisories/GHSA-wmw4-mw6x-6vfm)) -* **Stored XSS**: sanitize comment HTML after markdown parsing; require JWT for `POST /comment`; add CSP headers via Helmet -* Credit: reported by [lsr365400](https://github.com/lsr365400) +- **SQL injection**: whitelist filter column names in public list API `findAll()` handlers ([GHSA-wmw4-mw6x-6vfm](https://github.com/fecommunity/reactpress/security/advisories/GHSA-wmw4-mw6x-6vfm)) +- **Stored XSS**: sanitize comment HTML after markdown parsing; require JWT for `POST /comment`; add CSP headers via Helmet +- Credit: reported by [lsr365400](https://github.com/lsr365400) # [3.6.0](https://github.com/fecommunity/reactpress/compare/v3.5.0...v3.6.0) (2026-06-14) ### Docs CI/CD & Deployment -* **Docs deployment**: GitHub Actions CI/CD pipeline for documentation site deployment -* **Vercel**: configuration migrated to repository root; documentation links updated to new deployment URL -* **CI**: removed deprecated deploy workflow; MySQL service image switched to AWS ECR public mirror for faster GHA builds -* **Config**: improved `DOCS_SITE_URL` handling in deployment configuration +- **Docs deployment**: GitHub Actions CI/CD pipeline for documentation site deployment +- **Vercel**: configuration migrated to repository root; documentation links updated to new deployment URL +- **CI**: removed deprecated deploy workflow; MySQL service image switched to AWS ECR public mirror for faster GHA builds +- **Config**: improved `DOCS_SITE_URL` handling in deployment configuration # [3.5.0](https://github.com/fecommunity/reactpress/compare/v3.4.0...v3.5.0) (2026-06-14) ### Theme Catalog -* **npm theme catalog**: added `theme.catalog.schema.json` and `themes/package.json` for theme discovery and management +- **npm theme catalog**: added `theme.catalog.schema.json` and `themes/package.json` for theme discovery and management # [3.4.0](https://github.com/fecommunity/reactpress/compare/v3.3.0...v3.4.0) (2026-06-12) ### Community -* **Issue templates**: updated bug report, feature request, and config templates for improved clarity and usability +- **Issue templates**: updated bug report, feature request, and config templates for improved clarity and usability # [3.3.0](https://github.com/fecommunity/reactpress/compare/v3.2.0...v3.3.0) (2026-06-07) ### Community & Security -* **Code of Conduct**: added `CODE_OF_CONDUCT.md` -* **Security Policy**: added `SECURITY.md` with vulnerability reporting guidelines +- **Code of Conduct**: added `CODE_OF_CONDUCT.md` +- **Security Policy**: added `SECURITY.md` with vulnerability reporting guidelines # [3.2.0](https://github.com/fecommunity/reactpress/compare/v3.1.1...v3.2.0) (2026-06-07) ### Theme Development -* **Next.js config**: added Next.js configuration and node helpers for theme development workflow +- **Next.js config**: added Next.js configuration and node helpers for theme development workflow # [3.1.1](https://github.com/fecommunity/reactpress/compare/v3.1.0...v3.1.1) (2026-06-07) ### Bug Fixes -* **Theme schema**: corrected `theme.manifest.schema.json` `$id` URL for accuracy +- **Theme schema**: corrected `theme.manifest.schema.json` `$id` URL for accuracy # [3.1.0](https://github.com/fecommunity/reactpress/compare/v3.0.0...v3.1.0) (2026-06-07) ### Toolkit Theme Refactor -* **Toolkit 3.1**: `@fecommunity/reactpress-toolkit` split into `theme` / `ui` / `app` / `plugin` submodules; theme manifest parsing, appearance config (Formily), SSR bootstrap, site settings & preview -* **Export paths**: `package.json` exports add `./theme`, `./ui`, `./app`, `./plugin/*` subpaths for on-demand theme and plugin imports +- **Toolkit 3.1**: `@fecommunity/reactpress-toolkit` split into `theme` / `ui` / `app` / `plugin` submodules; theme manifest parsing, appearance config (Formily), SSR bootstrap, site settings & preview +- **Export paths**: `package.json` exports add `./theme`, `./ui`, `./app`, `./plugin/*` subpaths for on-demand theme and plugin imports ### CLI & Operations -* **CLI 3.0.3**: `reactpress nginx` reverse proxy management; `reactpress db backup` supports Docker `mysqldump`; `reactpress build` target selection & step logging; improved interactive theming and error messages -* **Fix**: enhanced monorepo root detection logic +- **CLI 3.0.3**: `reactpress nginx` reverse proxy management; `reactpress db backup` supports Docker `mysqldump`; `reactpress build` target selection & step logging; improved interactive theming and error messages +- **Fix**: enhanced monorepo root detection logic ### Brand Assets -* **Unified branding**: `public/brand/`, `public/favicon/`, and `public/icons/` centrally manage logo / favicon / PWA icons -* **Export script**: `pnpm export:brand` syncs assets to server, web, cli, themes, and other directories +- **Unified branding**: `public/brand/`, `public/favicon/`, and `public/icons/` centrally manage logo / favicon / PWA icons +- **Export script**: `pnpm export:brand` syncs assets to server, web, cli, themes, and other directories ### Docs & Other -* **README**: added official theme section, Lighthouse performance metrics, and "Why ReactPress?" overview -* **Theme schema**: `theme.manifest.schema.json` `$id` updated to `reactpress-docs.vercel.app` +- **README**: added official theme section, Lighthouse performance metrics, and "Why ReactPress?" overview +- **Theme schema**: `theme.manifest.schema.json` `$id` updated to `reactpress-docs.vercel.app` # [3.0.0](https://github.com/fecommunity/reactpress/compare/v2.0.2...v3.0.0) (2026-05-17) ### Platform 3.0 — CLI-first Headless -* **CLI**: main package renamed to `@fecommunity/reactpress`; `reactpress dev` prints frontend/admin/API/Swagger URLs on ready; `doctor`/`dev` failures include actionable suggestions; CLI i18n (`REACTPRESS_LANG` / `--lang`); `reactpress-cli` bin deprecated -* **Headless**: `GET /api/health`; API Key (`X-API-Key` + `/api/article/headless/list`); Webhooks (`article.published`, `comment.created`, HMAC signature + 3 retries) -* **Content**: scheduled article publishing (`scheduledPublishAt`); article revision history & rollback -* **Config**: root `.env.example`; removed deprecated `.reactpress` config path -* **Ops**: `cli/templates/docker-compose.prod.yml` production example; `scripts/benchmark-cold-start.mjs` cold-start benchmark -* **Breaking**: `@fecommunity/reactpress-server` deprecated; use `@fecommunity/reactpress@3`; see [docs/migration-2-to-3.md](./docs/migration-2-to-3.md) +- **CLI**: main package renamed to `@fecommunity/reactpress`; `reactpress dev` prints frontend/admin/API/Swagger URLs on ready; `doctor`/`dev` failures include actionable suggestions; CLI i18n (`REACTPRESS_LANG` / `--lang`); `reactpress-cli` bin deprecated +- **Headless**: `GET /api/health`; API Key (`X-API-Key` + `/api/article/headless/list`); Webhooks (`article.published`, `comment.created`, HMAC signature + 3 retries) +- **Content**: scheduled article publishing (`scheduledPublishAt`); article revision history & rollback +- **Config**: root `.env.example`; removed deprecated `.reactpress` config path +- **Ops**: `cli/templates/docker-compose.prod.yml` production example; `scripts/benchmark-cold-start.mjs` cold-start benchmark +- **Breaking**: `@fecommunity/reactpress-server` deprecated; use `@fecommunity/reactpress@3`; see [docs/migration-2-to-3.md](./docs/migration-2-to-3.md) # [2.0.0-beta-4-beta.1](https://github.com/fecommunity/reactpress/compare/v2.0.1...v2.0.0-beta-4-beta.1) (2025-11-16) - ### Features -* optimize docker development ([e0dfa36](https://github.com/fecommunity/reactpress/commit/e0dfa360e5d754d9ab9c22939e7754907abfe6e5)) -* support docker deploy [to [#26](https://github.com/fecommunity/reactpress/issues/26)] ([9eafb4a](https://github.com/fecommunity/reactpress/commit/9eafb4a093278a717d98bbd52583a5624f7fa30d)) - - +- optimize docker development ([e0dfa36](https://github.com/fecommunity/reactpress/commit/e0dfa360e5d754d9ab9c22939e7754907abfe6e5)) +- support docker deploy [to [#26](https://github.com/fecommunity/reactpress/issues/26)] ([9eafb4a](https://github.com/fecommunity/reactpress/commit/9eafb4a093278a717d98bbd52583a5624f7fa30d)) ## [2.0.1](https://github.com/fecommunity/reactpress/compare/v2.0.0...v2.0.1) (2025-09-26) - ### Bug Fixes -* correct HttpClient filename case sensitivity ([7dd892a](https://github.com/fecommunity/reactpress/commit/7dd892a8d5b05a3ab24eaf73577848eb25b06450)) - +- correct HttpClient filename case sensitivity ([7dd892a](https://github.com/fecommunity/reactpress/commit/7dd892a8d5b05a3ab24eaf73577848eb25b06450)) ### Features -* add config for toolkit package ([0ed839d](https://github.com/fecommunity/reactpress/commit/0ed839d4667d671ea06b088c0bac5a2890680445)) - - +- add config for toolkit package ([0ed839d](https://github.com/fecommunity/reactpress/commit/0ed839d4667d671ea06b088c0bac5a2890680445)) # [2.0.0](https://github.com/fecommunity/reactpress/compare/v1.10.0...v2.0.0) (2025-09-21) - ### Bug Fixes -* server load issue ([a6f759b](https://github.com/fecommunity/reactpress/commit/a6f759b386e32727501b0eea3ea38f5a89dfe700)) -* type defs ([d6491d5](https://github.com/fecommunity/reactpress/commit/d6491d56f2ffdd19d5a47fda7273958cd4243fb3)) - +- server load issue ([a6f759b](https://github.com/fecommunity/reactpress/commit/a6f759b386e32727501b0eea3ea38f5a89dfe700)) +- type defs ([d6491d5](https://github.com/fecommunity/reactpress/commit/d6491d56f2ffdd19d5a47fda7273958cd4243fb3)) ### Features -* add hello-world template ([7e2c948](https://github.com/fecommunity/reactpress/commit/7e2c9487ddc6023d7b382250b131fbe828013680)) -* add reactpress toolkit ([58f9312](https://github.com/fecommunity/reactpress/commit/58f9312644736aceb362e517fad8c3b3a83f275f)) -* add swagger v2 ui ([ef9fdc1](https://github.com/fecommunity/reactpress/commit/ef9fdc166955b4659c81fb559138ce38ef599cfe)) -* add twentytwentyfive theme ([715281f](https://github.com/fecommunity/reactpress/commit/715281fedcf8072348e4b8b6794891c7e67e1f99)) -* support npx install server ([e7f7b97](https://github.com/fecommunity/reactpress/commit/e7f7b970bb4dd8b845fcd8dde4048678a403557a)) -* support quick install ([96c1d0a](https://github.com/fecommunity/reactpress/commit/96c1d0a7cc1c72b7f6c489ba236ab6eb78472dee)) -* support quick install ([793bca7](https://github.com/fecommunity/reactpress/commit/793bca79f2bfa921f75bc1cc5f234207aa0ab40a)) - - +- add hello-world template ([7e2c948](https://github.com/fecommunity/reactpress/commit/7e2c9487ddc6023d7b382250b131fbe828013680)) +- add reactpress toolkit ([58f9312](https://github.com/fecommunity/reactpress/commit/58f9312644736aceb362e517fad8c3b3a83f275f)) +- add swagger v2 ui ([ef9fdc1](https://github.com/fecommunity/reactpress/commit/ef9fdc166955b4659c81fb559138ce38ef599cfe)) +- add twentytwentyfive theme ([715281f](https://github.com/fecommunity/reactpress/commit/715281fedcf8072348e4b8b6794891c7e67e1f99)) +- support npx install server ([e7f7b97](https://github.com/fecommunity/reactpress/commit/e7f7b970bb4dd8b845fcd8dde4048678a403557a)) +- support quick install ([96c1d0a](https://github.com/fecommunity/reactpress/commit/96c1d0a7cc1c72b7f6c489ba236ab6eb78472dee)) +- support quick install ([793bca7](https://github.com/fecommunity/reactpress/commit/793bca79f2bfa921f75bc1cc5f234207aa0ab40a)) # [1.10.0](https://github.com/fecommunity/reactpress/compare/v1.9.0...v1.10.0) (2025-08-03) - ### Features -* add type defs for config ([d8a6fed](https://github.com/fecommunity/reactpress/commit/d8a6fed7bc13f74be0916f80497590c7e737fb86)) - - +- add type defs for config ([d8a6fed](https://github.com/fecommunity/reactpress/commit/d8a6fed7bc13f74be0916f80497590c7e737fb86)) # [1.9.0](https://github.com/fecommunity/reactpress/compare/v1.8.0...v1.9.0) (2025-05-21) - - # [1.8.0](https://github.com/fecommunity/reactpress/compare/v1.7.0...v1.8.0) (2025-03-22) - ### Features -* upgrade next version ([64cac4d](https://github.com/fecommunity/reactpress/commit/64cac4dcb9268a6bbb14fbbfe6995406638f7508)) - - +- upgrade next version ([64cac4d](https://github.com/fecommunity/reactpress/commit/64cac4dcb9268a6bbb14fbbfe6995406638f7508)) # [1.7.0](https://github.com/fecommunity/reactpress/compare/v1.6.0...v1.7.0) (2025-03-07) - ### Features -* add reactpress docs ([002972b](https://github.com/fecommunity/reactpress/commit/002972b6194d13917d60de8dae019445739760cc)) -* release reactpress v1.6.0 ([9d75118](https://github.com/fecommunity/reactpress/commit/9d75118b7e19d85ab95b3e6f227f1b95cd95acb8)) - - +- add reactpress docs ([002972b](https://github.com/fecommunity/reactpress/commit/002972b6194d13917d60de8dae019445739760cc)) +- release reactpress v1.6.0 ([9d75118](https://github.com/fecommunity/reactpress/commit/9d75118b7e19d85ab95b3e6f227f1b95cd95acb8)) # [1.6.0](https://github.com/fecommunity/reactpress/compare/v1.5.0...v1.6.0) (2024-12-21) - ### Features -* knowledge page perfect ([#16](https://github.com/fecommunity/reactpress/issues/16)) ([b9ae27d](https://github.com/fecommunity/reactpress/commit/b9ae27d087b3b451668b3c0acb40359b20a089e2)) - - +- knowledge page perfect ([#16](https://github.com/fecommunity/reactpress/issues/16)) ([b9ae27d](https://github.com/fecommunity/reactpress/commit/b9ae27d087b3b451668b3c0acb40359b20a089e2)) # [1.5.0](https://github.com/fecommunity/reactpress/compare/v1.4.0...v1.5.0) (2024-12-21) - ### Bug Fixes -* adapt small screen content display issue ([84895c8](https://github.com/fecommunity/reactpress/commit/84895c8341d34285068806d5908b2af358719f80)) -* add key for tex loop item ([e8a2e36](https://github.com/fecommunity/reactpress/commit/e8a2e36f13d5031d845c3c3055374e5ff0446bc2)) -* nav config build error ([66acf46](https://github.com/fecommunity/reactpress/commit/66acf46485f902aa0647b4886beb0701372b95c2)) -* nav query id undefined ([2d0bbd7](https://github.com/fecommunity/reactpress/commit/2d0bbd78f4d73579039b3a9bf7c846fe2d976073)) -* route level default value ([4aae64e](https://github.com/fecommunity/reactpress/commit/4aae64e86346052cb51e63e7c149853a6d8d8ae6)) - +- adapt small screen content display issue ([84895c8](https://github.com/fecommunity/reactpress/commit/84895c8341d34285068806d5908b2af358719f80)) +- add key for tex loop item ([e8a2e36](https://github.com/fecommunity/reactpress/commit/e8a2e36f13d5031d845c3c3055374e5ff0446bc2)) +- nav config build error ([66acf46](https://github.com/fecommunity/reactpress/commit/66acf46485f902aa0647b4886beb0701372b95c2)) +- nav query id undefined ([2d0bbd7](https://github.com/fecommunity/reactpress/commit/2d0bbd78f4d73579039b3a9bf7c846fe2d976073)) +- route level default value ([4aae64e](https://github.com/fecommunity/reactpress/commit/4aae64e86346052cb51e63e7c149853a6d8d8ae6)) ### Features -* add animation tags cloud ([68b1a5b](https://github.com/fecommunity/reactpress/commit/68b1a5b2fe73fafd7a9b282ed77f836aa7a76bf6)) -* add global config setting page ([c825425](https://github.com/fecommunity/reactpress/commit/c82542540b20f423b3b3f3ba04ea5e48e2523f5c)) -* add nav page ([c6703c6](https://github.com/fecommunity/reactpress/commit/c6703c6e3dea33a8cc226f1c02d9b5cac0ef827e)) -* optimized page interaction experience ([b0ac19a](https://github.com/fecommunity/reactpress/commit/b0ac19ab31b6bcf0d8916aeb373e6fa7288303aa)) - - +- add animation tags cloud ([68b1a5b](https://github.com/fecommunity/reactpress/commit/68b1a5b2fe73fafd7a9b282ed77f836aa7a76bf6)) +- add global config setting page ([c825425](https://github.com/fecommunity/reactpress/commit/c82542540b20f423b3b3f3ba04ea5e48e2523f5c)) +- add nav page ([c6703c6](https://github.com/fecommunity/reactpress/commit/c6703c6e3dea33a8cc226f1c02d9b5cac0ef827e)) +- optimized page interaction experience ([b0ac19a](https://github.com/fecommunity/reactpress/commit/b0ac19ab31b6bcf0d8916aeb373e6fa7288303aa)) # [1.4.0](https://github.com/fecommunity/reactpress/compare/v1.3.0...v1.4.0) (2024-12-08) - - # [1.3.0](https://github.com/fecommunity/reactpress/compare/v1.2.0...v1.3.0) (2024-12-01) - ### Features -* add system systemSubTitle setting config ([136f012](https://github.com/fecommunity/reactpress/commit/136f01288cb9714092a2aa0dc01421817bb26b7d)) -* optimized the css style loading experience for homepage ([0e7761f](https://github.com/fecommunity/reactpress/commit/0e7761fd28c1cac099ac15ddaa644a904aca8da4)) -* react helmet seo perfect ([848a5da](https://github.com/fecommunity/reactpress/commit/848a5da2a60cbd4c0684d6607ad9df6eeaa2dd7b)) - - +- add system systemSubTitle setting config ([136f012](https://github.com/fecommunity/reactpress/commit/136f01288cb9714092a2aa0dc01421817bb26b7d)) +- optimized the css style loading experience for homepage ([0e7761f](https://github.com/fecommunity/reactpress/commit/0e7761fd28c1cac099ac15ddaa644a904aca8da4)) +- react helmet seo perfect ([848a5da](https://github.com/fecommunity/reactpress/commit/848a5da2a60cbd4c0684d6607ad9df6eeaa2dd7b)) # [1.2.0](https://github.com/fecommunity/reactpress/compare/v1.1.0...v1.2.0) (2024-11-23) - ### Bug Fixes -* system notice info empty error ([4e41daa](https://github.com/fecommunity/reactpress/commit/4e41daa14dc96499e6d65ebc2648f87147fc248d)) -* update admin view article link ([41656a7](https://github.com/fecommunity/reactpress/commit/41656a740d301cda7ec54bb6ceaaa8e8cea7c222)) - +- system notice info empty error ([4e41daa](https://github.com/fecommunity/reactpress/commit/4e41daa14dc96499e6d65ebc2648f87147fc248d)) +- update admin view article link ([41656a7](https://github.com/fecommunity/reactpress/commit/41656a740d301cda7ec54bb6ceaaa8e8cea7c222)) ### Features -* add category tag for article list ([f5068a1](https://github.com/fecommunity/reactpress/commit/f5068a17b4728a47330fbbbca0f236d12e299e40)) -* support system notification feature ([515e556](https://github.com/fecommunity/reactpress/commit/515e556d7b63192cbad4bda68d5ecf639cbaa96b)) - - +- add category tag for article list ([f5068a1](https://github.com/fecommunity/reactpress/commit/f5068a17b4728a47330fbbbca0f236d12e299e40)) +- support system notification feature ([515e556](https://github.com/fecommunity/reactpress/commit/515e556d7b63192cbad4bda68d5ecf639cbaa96b)) # [1.1.0](https://github.com/fecommunity/reactpress/compare/v1.0.0...v1.1.0) (2024-11-02) - - # [1.0.0](https://github.com/fecommunity/reactpress/compare/a6b73a189090e0199cc6f803bfb498cdeb7868a5...v1.0.0) (2024-09-28) - ### Bug Fixes -* add ignoreValidator for system creating user ([83408d2](https://github.com/fecommunity/reactpress/commit/83408d20383a6a57546dacfcd7751210c6c66d4c)) -* next build type defs ([ec428b3](https://github.com/fecommunity/reactpress/commit/ec428b3cfe6950a368e3aeb7bf9945cf81a1f481)) - +- add ignoreValidator for system creating user ([83408d2](https://github.com/fecommunity/reactpress/commit/83408d20383a6a57546dacfcd7751210c6c66d4c)) +- next build type defs ([ec428b3](https://github.com/fecommunity/reactpress/commit/ec428b3cfe6950a368e3aeb7bf9945cf81a1f481)) ### Features -* init easy-blog project ([a6b73a1](https://github.com/fecommunity/reactpress/commit/a6b73a189090e0199cc6f803bfb498cdeb7868a5)) - - - +- init easy-blog project ([a6b73a1](https://github.com/fecommunity/reactpress/commit/a6b73a189090e0199cc6f803bfb498cdeb7868a5)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1350364e..628258aa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,14 +7,14 @@ agree to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md). ## Ways to Contribute -| Type | How | -| :--- | :-- | -| **Bug reports** | [Bug report](https://github.com/fecommunity/reactpress/issues/new?template=bug_report.md) — steps, component, versions, logs | -| **Feature ideas** | [Feature request](https://github.com/fecommunity/reactpress/issues/new?template=feature_request.md) — problem, solution, area | -| **Community tasks** | [Help wanted](https://github.com/fecommunity/reactpress/issues/new?template=help_wanted.md) — scoped tasks labeled `help wanted` on GitHub | +| Type | How | +| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------- | +| **Bug reports** | [Bug report](https://github.com/fecommunity/reactpress/issues/new?template=bug_report.md) — steps, component, versions, logs | +| **Feature ideas** | [Feature request](https://github.com/fecommunity/reactpress/issues/new?template=feature_request.md) — problem, solution, area | +| **Community tasks** | [Help wanted](https://github.com/fecommunity/reactpress/issues/new?template=help_wanted.md) — scoped tasks labeled `help wanted` on GitHub | | **Product feedback** | [Feedback & suggestions](https://github.com/fecommunity/reactpress/issues/new?template=feedback.md) — UX and operator ideas (not security) | -| **Code & docs** | Fork, branch, submit a PR (see below) | -| **Security issues** | Follow [SECURITY.md](./SECURITY.md) — do **not** use public issues | +| **Code & docs** | Fork, branch, submit a PR (see below) | +| **Security issues** | Follow [SECURITY.md](./SECURITY.md) — do **not** use public issues | ## Security Contributors @@ -22,8 +22,8 @@ We thank researchers who practice responsible disclosure and help keep ReactPres secure. Valid reports are credited in [CHANGELOG.md](./CHANGELOG.md) and GitHub Security Advisories when applicable. -| Contributor | Contribution | -| :---------- | :----------- | +| Contributor | Contribution | +| :---------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [lsr365400](https://github.com/lsr365400) | Reported SQL injection and stored XSS ([GHSA-wmw4-mw6x-6vfm](https://github.com/fecommunity/reactpress/security/advisories/GHSA-wmw4-mw6x-6vfm)); contributed fixes in [PR #83](https://github.com/fecommunity/reactpress/pull/83) | ## Development Setup @@ -64,15 +64,15 @@ reactpress/ ## Development Workflow -| Task | Command | -|------|---------| -| Full stack dev | `pnpm dev` | -| API only (watch) | `pnpm dev:api` or `pnpm dev:server` | -| Client only | `pnpm dev:client` | -| Docker MySQL + proxy | `pnpm docker:dev` | -| Regenerate API types | `pnpm run build:toolkit` | -| Swagger spec | `pnpm run generate:swagger` | -| API lifecycle | `pnpm run start` / `stop` / `restart` / `status` | +| Task | Command | +| -------------------- | ------------------------------------------------ | +| Full stack dev | `pnpm dev` | +| API only (watch) | `pnpm dev:api` or `pnpm dev:server` | +| Client only | `pnpm dev:client` | +| Docker MySQL + proxy | `pnpm docker:dev` | +| Regenerate API types | `pnpm run build:toolkit` | +| Swagger spec | `pnpm run generate:swagger` | +| API lifecycle | `pnpm run start` / `stop` / `restart` / `status` | `pnpm dev` builds toolkit first, waits for API health, then starts the client. @@ -128,10 +128,13 @@ pnpm login --registry https://registry.npmjs.org # Interactive (choose beta/stable + version) pnpm run publish:packages +# Promote 4.0 beta → stable (@latest) +NPM_OTP=123456 pnpm run publish:packages -- --tag latest --version 4.0.0 --yes + # Beta prerelease (uses package.json versions, npm tag: beta) NPM_OTP=123456 pnpm run publish:packages -- --tag beta --yes -# Explicit version +# Explicit beta version NPM_OTP=123456 pnpm run publish:packages -- --tag beta --version 4.0.0-beta.0 --yes # Build artifacts only (no npm publish) @@ -142,14 +145,14 @@ Published packages: **toolkit**, **web**, **server** (deprecated), **cli** (`@fe ## Architecture & Documentation -| Topic | Reference | -| :---- | :-------- | -| Platform overview | [docs/tutorial/intro.md](./docs/tutorial/intro.md) | -| ReactPress 3.0 | [docs/tutorial/tutorial-extras/reactpress-3-0.md](./docs/tutorial/tutorial-extras/reactpress-3-0.md) | -| Upgrade from 2.x | [docs/migration-2-to-3.md](./docs/migration-2-to-3.md) | -| Configuration | [docs/tutorial/tutorial-extras/config-intro.md](./docs/tutorial/tutorial-extras/config-intro.md) | -| Theme manifest schema | [themes/theme.manifest.schema.json](./themes/theme.manifest.schema.json) | -| Changelog | [CHANGELOG.md](./CHANGELOG.md) | +| Topic | Reference | +| :-------------------- | :--------------------------------------------------------------------------------------------------- | +| Platform overview | [docs/tutorial/intro.md](./docs/tutorial/intro.md) | +| ReactPress 3.0 | [docs/tutorial/tutorial-extras/reactpress-3-0.md](./docs/tutorial/tutorial-extras/reactpress-3-0.md) | +| Upgrade from 2.x | [docs/migration-2-to-3.md](./docs/migration-2-to-3.md) | +| Configuration | [docs/tutorial/tutorial-extras/config-intro.md](./docs/tutorial/tutorial-extras/config-intro.md) | +| Theme manifest schema | [themes/theme.manifest.schema.json](./themes/theme.manifest.schema.json) | +| Changelog | [CHANGELOG.md](./CHANGELOG.md) | Live docs: [blog.gaoredu.com](https://blog.gaoredu.com) diff --git a/README-zh_CN.md b/README-zh_CN.md index 1db51900..a7887428 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -91,14 +91,14 @@ ## 30 秒快速开始 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` **环境要求:** [Node.js 20+](https://nodejs.org/) · 无需 Docker 或外部数据库 -> 4.x 发布在 npm **`@beta`** 标签(`@latest` 仍为 3.x)。 +> 4.0 已发布在 npm **`@latest`**。仅预发布版本使用 `@beta`。 | 入口 | 地址 | | :----------- | :------------------------------------------------ | @@ -303,7 +303,7 @@ SQLite 本地存储 · 离线编辑 · 远程 API 模式 · 同步到生产 · [ 代号 **Extend** — 插件、桌面端、npm 主题。仍是 **一条 CLI、一套 Admin**。 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` [4.0 指南](./docs/tutorial/tutorial-extras/reactpress-4-0.md) · [从 3.x 迁移](./docs/tutorial/tutorial-extras/migration-3-to-4.md) @@ -392,7 +392,7 @@ Monorepo 贡献者请参阅 [CONTRIBUTING.md](./CONTRIBUTING.md) 及各子包 RE
4.0 能用于生产吗? -4.0 处于 beta 阶段(撰写时为 `4.0.0-beta.18`)。已发布的 CLI 支持 `init`、`doctor`、`logs`、`stop`。生产环境升级前请阅读[迁移指南](./docs/tutorial/tutorial-extras/migration-3-to-4.md)。 +4.0.0 为当前稳定版(npm `@latest`)。CLI 支持 `init`、`doctor`、`logs`、`stop`。从 3.x 升级请阅读[迁移指南](./docs/tutorial/tutorial-extras/migration-3-to-4.md)。
diff --git a/README.md b/README.md index 5f2986e2..be88d897 100644 --- a/README.md +++ b/README.md @@ -92,14 +92,14 @@ ## 30-second start ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` **Requirements:** [Node.js 20+](https://nodejs.org/) · No Docker or external database -> 4.x 发布在 npm **`@beta`** 标签(`@latest` 仍为 3.x)。 +> 4.0 is on npm **`@latest`**. Use `@beta` only for prereleases. | Surface | URL | | :-------------- | :----------------------------------------------- | @@ -315,7 +315,7 @@ SQLite local storage · offline editing · remote API mode · sync to production Codename **Extend** — plugins, desktop, npm themes. Still **one CLI, one Admin.** ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` [4.0 guide](./docs/tutorial/tutorial-extras/reactpress-4-0.md) · [Migrate from 3.x](./docs/tutorial/tutorial-extras/migration-3-to-4.md) @@ -404,7 +404,7 @@ Same admin-driven workflow, but a faster default theme, a cleaner headless path,
Is 4.0 production-ready? -4.0 is in active beta (`4.0.0-beta.18` at time of writing). The published CLI supports `init`, `doctor`, `logs`, and `stop`. See the [migration guide](./docs/tutorial/tutorial-extras/migration-3-to-4.md) before upgrading production. +4.0.0 is the current stable release on npm `@latest`. The CLI supports `init`, `doctor`, `logs`, and `stop`. See the [migration guide](./docs/tutorial/tutorial-extras/migration-3-to-4.md) before upgrading from 3.x.
diff --git a/SECURITY.md b/SECURITY.md index dc1b7e23..78592eb3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,17 +7,17 @@ ReactPress 3.x receives critical fixes on a best-effort basis during the 4.x rol Older major versions (2.x and below) no longer receive security updates unless noted in a release announcement. -| Version | Supported | -| :------ | :----------------- | -| 4.x | :white_check_mark: | +| Version | Supported | +| :------ | :--------------------- | +| 4.x | :white_check_mark: | | 3.x | :warning: (transition) | -| 2.x | :x: | -| < 2.0 | :x: | +| 2.x | :x: | +| < 2.0 | :x: | Install the latest release: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` ## Reporting a Vulnerability @@ -44,12 +44,12 @@ Include as much of the following as you can: ## What to Expect -| Timeline | Action | -| :------- | :----- | -| **Within 72 hours** | Acknowledgement of your report | -| **Within 7 days** | Initial assessment and severity classification | -| **Ongoing** | Status updates until resolved | -| **After fix** | Coordinated disclosure and credit in release notes (if desired) | +| Timeline | Action | +| :------------------ | :-------------------------------------------------------------- | +| **Within 72 hours** | Acknowledgement of your report | +| **Within 7 days** | Initial assessment and severity classification | +| **Ongoing** | Status updates until resolved | +| **After fix** | Coordinated disclosure and credit in release notes (if desired) | We appreciate responsible disclosure. Valid reports may be credited in [CHANGELOG.md](./CHANGELOG.md) unless you prefer to remain anonymous. diff --git a/cli/README.md b/cli/README.md index db2ad9f6..b8298159 100644 --- a/cli/README.md +++ b/cli/README.md @@ -4,20 +4,20 @@ > > CMS, Admin, Headless API, Next.js themes, plugins & desktop — one CLI, zero assembly. -[![npm version](https://img.shields.io/npm/v/@fecommunity/reactpress/beta.svg?label=beta)](https://www.npmjs.com/package/@fecommunity/reactpress/v/beta) [![npm latest](https://img.shields.io/npm/v/@fecommunity/reactpress.svg?label=latest)](https://www.npmjs.com/package/@fecommunity/reactpress) +[![npm beta](https://img.shields.io/npm/v/@fecommunity/reactpress/beta.svg?label=beta)](https://www.npmjs.com/package/@fecommunity/reactpress/v/beta) [![npm downloads](https://img.shields.io/npm/dm/@fecommunity/reactpress.svg)](https://www.npmjs.com/package/@fecommunity/reactpress) [![License: MIT](https://img.shields.io/npm/l/@fecommunity/reactpress.svg)](https://github.com/fecommunity/reactpress/blob/master/LICENSE) [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square&logo=node.js&logoColor=white)](https://nodejs.org/) The official **ReactPress CLI** — install a complete, self-hosted publishing stack in ~60 seconds. CMS API, Web Admin, and Next.js theme support ship together. No Docker, nginx, or external database required for local development. -| Layer | What you get | -| :---- | :----------- | -| **CMS API** | Headless NestJS REST — SQLite locally, MySQL in production | -| **Admin** | Writing console at `/admin/` — posts, pages, media, plugins, themes | -| **Themes** | npm-installable Next.js frontends — swap without touching content | -| **CLI** | `init`, `doctor`, `logs` — operate and diagnose from the terminal | +| Layer | What you get | +| :---------- | :------------------------------------------------------------------ | +| **CMS API** | Headless NestJS REST — SQLite locally, MySQL in production | +| **Admin** | Writing console at `/admin/` — posts, pages, media, plugins, themes | +| **Themes** | npm-installable Next.js frontends — swap without touching content | +| **CLI** | `init`, `doctor`, `logs` — operate and diagnose from the terminal | Built for frontend teams who want WordPress-grade editing without wiring five repos together. @@ -26,11 +26,11 @@ Built for frontend teams who want WordPress-grade editing without wiring five re ## Install ```bash -# 4.x pre-release (recommended until 4.0.0 stable) -npm install -g @fecommunity/reactpress@beta +# Stable 4.x (npm @latest) +npm install -g @fecommunity/reactpress -# stable (3.x — legacy) -# npm install -g @fecommunity/reactpress +# Prerelease channel +# npm install -g @fecommunity/reactpress@beta ``` Requires Node.js 20+. On first install, `postinstall` downloads bundled server runtime dependencies (~1–2 minutes). @@ -42,22 +42,22 @@ mkdir my-site && cd my-site reactpress init ``` -| Surface | URL | -| :------ | :-- | -| **Public site** | http://localhost:3001 | -| **Admin** | http://localhost:3001/admin/ (`admin` / `admin`) | -| **API** | http://127.0.0.1:3002/api | +| Surface | URL | +| :-------------- | :----------------------------------------------- | +| **Public site** | http://localhost:3001 | +| **Admin** | http://localhost:3001/admin/ (`admin` / `admin`) | +| **API** | http://127.0.0.1:3002/api | Run `reactpress doctor` if something does not start correctly. ## Commands -| Command | Description | -| :------ | :---------- | -| `reactpress init [dir]` | Initialize a new publishing site | +| Command | Description | +| :------------------------ | :---------------------------------------------- | +| `reactpress init [dir]` | Initialize a new publishing site | | `reactpress doctor [dir]` | Diagnose Node.js, ports, database, and services | -| `reactpress logs [dir]` | Tail API logs (error / request / response) | -| `reactpress stop [dir]` | Stop API and site services | +| `reactpress logs [dir]` | Tail API logs (error / request / response) | +| `reactpress stop [dir]` | Stop API and site services | ## Requirements @@ -67,11 +67,11 @@ Run `reactpress doctor` if something does not start correctly. ## Ecosystem -| Package | Role | -| :------ | :--- | +| Package | Role | +| :----------------------------------------------- | :---------------------------------------------------- | | [`@fecommunity/reactpress-toolkit`](../toolkit/) | TypeScript SDK — API clients, theme SSR, plugin hooks | -| [`@fecommunity/reactpress-web`](../web/) | Admin SPA — static assets and Node mount helpers | -| [`@fecommunity/reactpress-server`](../server/) | Standalone API (deprecated — use CLI bundled API) | +| [`@fecommunity/reactpress-web`](../web/) | Admin SPA — static assets and Node mount helpers | +| [`@fecommunity/reactpress-server`](../server/) | Standalone API (deprecated — use CLI bundled API) | ## License diff --git a/cli/package.json b/cli/package.json index 59f55663..f71fceb3 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@fecommunity/reactpress", - "version": "4.0.0-beta.18", + "version": "4.0.0", "description": "ReactPress CLI — Publish with React. Ship like WordPress. CMS, Admin, Headless API, and Next.js themes in one command. Self-hosted, MIT. `npx @fecommunity/reactpress init`", "author": "fecommunity", "license": "MIT", diff --git a/cli/server/bin/reactpress-server.js b/cli/server/bin/reactpress-server.js old mode 100644 new mode 100755 index c6121a15..13933a9c --- a/cli/server/bin/reactpress-server.js +++ b/cli/server/bin/reactpress-server.js @@ -67,14 +67,14 @@ function installPM2() { console.log('[ReactPress Server] Installing PM2...'); const installResult = spawnSync('npm', ['install', 'pm2', '--no-save'], { stdio: 'inherit', - cwd: serverDir + cwd: serverDir, }); - + if (installResult.status !== 0) { console.error('[ReactPress Server] Failed to install PM2'); return false; } - + return true; } @@ -88,25 +88,25 @@ function startWithPM2() { process.exit(1); } } - + // Check if the server is built if (!fs.existsSync(distPath)) { console.log('[ReactPress Server] Server not built yet. Building...'); - + // Try to build the server const buildResult = spawnSync('npm', ['run', 'build'], { stdio: 'inherit', - cwd: serverDir + cwd: serverDir, }); - + if (buildResult.status !== 0) { console.error('[ReactPress Server] Failed to build server'); process.exit(1); } } - + console.log('[ReactPress Server] Starting with PM2...'); - + // Use ecosystem.config.js if it exists, otherwise use direct command let pm2Command = 'pm2'; try { @@ -118,19 +118,19 @@ function startWithPM2() { } catch (e) { pm2Command = 'pm2'; } - + // Check if ecosystem.config.js exists if (fs.existsSync(ecosystemPath)) { const pm2 = spawn(pm2Command, ['start', ecosystemPath], { stdio: 'inherit', - cwd: serverDir + cwd: serverDir, }); - + pm2.on('close', (code) => { console.log(`[ReactPress Server] PM2 process exited with code ${code}`); process.exit(code); }); - + pm2.on('error', (error) => { console.error('[ReactPress Server] Failed to start with PM2:', error); process.exit(1); @@ -139,14 +139,14 @@ function startWithPM2() { // Fallback to direct start const pm2 = spawn(pm2Command, ['start', distPath, '--name', 'reactpress-server'], { stdio: 'inherit', - cwd: serverDir + cwd: serverDir, }); - + pm2.on('close', (code) => { console.log(`[ReactPress Server] PM2 process exited with code ${code}`); process.exit(code); }); - + pm2.on('error', (error) => { console.error('[ReactPress Server] Failed to start with PM2:', error); process.exit(1); @@ -154,18 +154,34 @@ function startWithPM2() { } } +// Function to prepend bundled runtime paths so sibling toolkit/ can resolve server/node_modules. +function prependNodePath(...dirs) { + const Module = require('module'); + const sep = path.delimiter; + const parts = (process.env.NODE_PATH || '').split(sep).filter(Boolean); + for (const dir of dirs) { + if (fs.existsSync(dir) && !parts.includes(dir)) { + parts.unshift(dir); + } + } + if (parts.length) { + process.env.NODE_PATH = parts.join(sep); + Module._initPaths(); + } +} + // Function to start with regular Node.js function startWithNode() { // Check if the server is built if (!fs.existsSync(distPath)) { console.log('[ReactPress Server] Server not built yet. Building...'); - + // Try to build the server const buildResult = spawnSync('npm', ['run', 'build'], { stdio: 'inherit', - cwd: serverDir + cwd: serverDir, }); - + if (buildResult.status !== 0) { console.error('[ReactPress Server] Failed to build server'); process.exit(1); @@ -180,15 +196,43 @@ function startWithNode() { console.log(`[ReactPress Server] Using existing REACTPRESS_ORIGINAL_CWD: ${process.env.REACTPRESS_ORIGINAL_CWD}`); } + const siteRoot = process.env.REACTPRESS_ORIGINAL_CWD; + for (const localSiteModule of [ + path.join(serverDir, '..', 'cli', 'out', 'core', 'services', 'local-site.js'), + path.join(serverDir, '..', 'out', 'core', 'services', 'local-site.js'), + ]) { + if (!siteRoot || !fs.existsSync(localSiteModule)) continue; + try { + const { ensureBundledPlugins } = require(localSiteModule); + if (ensureBundledPlugins(siteRoot)) { + console.log('[ReactPress Server] Seeded bundled plugins into project'); + } + } catch { + // ignore — plugins seeding is best-effort + } + break; + } + // Change to the server directory process.chdir(serverDir); // Set environment variables process.env.NODE_ENV = process.env.NODE_ENV || 'production'; - // Import and run the server + // Bundled CLI layout: toolkit/ is a sibling of server/; expose server deps to toolkit requires. + prependNodePath(path.join(serverDir, 'node_modules')); + + // Import and run the server (require() alone does not invoke main — see dist/main.js) try { - require(distPath); + const mainModule = require(distPath); + if (typeof mainModule.main !== 'function') { + console.error('[ReactPress Server] Server entry does not export main()'); + process.exit(1); + } + mainModule.main().catch((error) => { + console.error('[ReactPress Server] Failed to start server:', error); + process.exit(1); + }); } catch (error) { console.error('[ReactPress Server] Failed to start server:', error); process.exit(1); diff --git a/cli/server/package-lock.json b/cli/server/package-lock.json index c8e4a4f6..21b49555 100644 --- a/cli/server/package-lock.json +++ b/cli/server/package-lock.json @@ -1,12 +1,12 @@ { "name": "@fecommunity/reactpress-server", - "version": "4.0.0-beta.18", + "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@fecommunity/reactpress-server", - "version": "4.0.0-beta.18", + "version": "4.0.0", "deprecated": "Bundled in @fecommunity/reactpress CLI from v3.1. Run `npx @fecommunity/reactpress init` for new projects.", "license": "MIT", "dependencies": { @@ -91,7 +91,7 @@ }, "../toolkit": { "name": "@fecommunity/reactpress-toolkit", - "version": "4.0.0-beta.18", + "version": "4.0.0", "dependencies": { "ajv": "^8.17.1", "axios": "^1.12.2", diff --git a/cli/server/package.json b/cli/server/package.json index 4f84e927..57777432 100644 --- a/cli/server/package.json +++ b/cli/server/package.json @@ -1,11 +1,18 @@ { - "name": "reactpress-server", - "version": "1.0.0-beta.16", - "description": "ReactPress Server - NestJS-based backend API for ReactPress CMS", + "name": "@fecommunity/reactpress-server", + "version": "4.0.0", + "deprecated": "Bundled in @fecommunity/reactpress CLI from v3.1. Run `npx @fecommunity/reactpress init` for new projects.", + "description": "ReactPress NestJS REST API (deprecated). Bundled in @fecommunity/reactpress CLI from v3.1. Headless CMS for articles, media, plugins, and themes", "author": "fecommunity", "license": "MIT", + "homepage": "https://docs.gaoredu.com/", + "bugs": { + "url": "https://github.com/fecommunity/reactpress/issues" + }, "main": "dist/main.js", - "types": "dist/index.d.ts", + "bin": { + "reactpress-server": "./bin/reactpress-server.js" + }, "files": [ "dist/**/*", "public/**/*", @@ -15,27 +22,36 @@ ], "keywords": [ "reactpress", - "server", "nestjs", + "headless-cms", "cms", "blog", + "rest-api", "api", - "typescript" + "openapi", + "swagger", + "typescript", + "self-hosted" ], "repository": { "type": "git", "url": "git+https://github.com/fecommunity/reactpress.git", "directory": "server" }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org/" + }, "engines": { - "node": ">=16.5.0" + "node": ">=18" }, "scripts": { - "prebuild": "rimraf dist", + "clean": "rimraf dist", "build": "nest build && npm run copy-assets", "copy-assets": "cp -r public dist/ 2>/dev/null || true", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", - "dev": "nest start --watch", + "predev": "node scripts/ensure-dev-dist.js", + "dev": "cross-env REACTPRESS_API_ENTRY=starter nest start --watch", "debug": "nest start --debug --watch", "start": "cross-env NODE_ENV=production node dist/main", "pm2": "pm2 start npm --name @fecommunity/reactpress-server -- start", @@ -70,9 +86,7 @@ "axios": "^0.23.0", "bcryptjs": "^2.4.3", "body-parser": "^1.19.0", - "chalk": "^4.1.2", "class-transformer": "^0.2.3", - "commander": "^9.4.1", "compression": "^1.7.4", "cross-env": "^7.0.3", "date-fns": "^2.17.0", @@ -83,11 +97,11 @@ "fs-extra": "^10.0.0", "helmet": "^3.21.2", "highlight.js": "^9.18.0", - "inquirer": "^8.2.4", "lodash": "^4.17.21", "log4js": "^6.1.0", "marked": "^0.8.0", "mysql2": "^3.12.0", + "sqlite3": "^5.1.7", "node-ip2region": "^1.0.2", "nodemailer": "^6.4.2", "nuid": "^1.1.0", @@ -99,6 +113,7 @@ "rimraf": "^3.0.0", "rxjs": "^6.5.3", "segment": "^0.1.3", + "sharp": "^0.34.5", "swagger-themes": "^1.4.3", "swagger-ui-express": "^4.1.6", "typeorm": "^0.2.45", @@ -119,7 +134,6 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-simple-import-sort": "^7.0.0", "jest": "^24.9.0", - "next-transpile-modules": "^6.3.0", "prettier": "^1.18.2", "supertest": "^4.0.2", "ts-jest": "^24.1.0", @@ -127,7 +141,7 @@ "ts-node": "^8.4.1", "tsconfig-paths": "^3.9.0", "tslint": "^5.20.0", - "typescript": "~4.1.6" + "typescript": "~4.9.5" }, "jest": { "moduleFileExtensions": [ diff --git a/cli/server/public/favicon.png b/cli/server/public/favicon.png index 521edf80..f455437f 100644 Binary files a/cli/server/public/favicon.png and b/cli/server/public/favicon.png differ diff --git a/cli/src/lib/publish.ts b/cli/src/lib/publish.ts index 0dc90f0a..d26914fd 100644 --- a/cli/src/lib/publish.ts +++ b/cli/src/lib/publish.ts @@ -55,6 +55,11 @@ function getCanonicalVersion() { return getCurrentVersion('cli'); } +/** Strip prerelease suffix: `4.0.0-beta.18` → `4.0.0`. */ +function promoteToStable(version) { + return String(version).split('-')[0]; +} + function incrementVersion(version, type) { const base = String(version).split('-')[0]; const parts = base.split('.').map((p) => parseInt(p, 10)); @@ -75,6 +80,8 @@ function incrementVersion(version, type) { if (match) return `${match[1]}-beta.${parseInt(match[2], 10) + 1}`; return `${base}-beta.0`; } + case 'stable': + return promoteToStable(version); default: return version; } @@ -237,22 +244,31 @@ async function promptPublishPlan(defaults = {}) { }, ]); + const stableCandidate = promoteToStable(current); + const canPromoteStable = String(current).includes('-') && stableCandidate !== current; + + const versionChoices = [ + { name: `Keep ${current}`, value: 'keep' }, + ...(canPromoteStable + ? [{ name: `Promote to stable (${stableCandidate}) → npm latest`, value: 'stable' }] + : []), + { name: `Bump beta (${incrementVersion(current, 'beta')})`, value: 'beta' }, + { name: `Bump patch (${incrementVersion(current, 'patch')})`, value: 'patch' }, + { name: 'Enter custom version', value: 'custom' }, + ]; + const { versionMode } = await inquirer.prompt([ { type: 'list', name: 'versionMode', message: `Version (current: ${current}):`, - choices: [ - { name: `Keep ${current}`, value: 'keep' }, - { name: `Bump beta (${incrementVersion(current, 'beta')})`, value: 'beta' }, - { name: `Bump patch (${incrementVersion(current, 'patch')})`, value: 'patch' }, - { name: 'Enter custom version', value: 'custom' }, - ], + choices: versionChoices, + default: channel === 'latest' && canPromoteStable ? 'stable' : 'keep', }, ]); let version = current; - if (versionMode === 'beta' || versionMode === 'patch') { + if (versionMode === 'beta' || versionMode === 'patch' || versionMode === 'stable') { version = incrementVersion(current, versionMode); } else if (versionMode === 'custom') { const { customVersion } = await inquirer.prompt([ @@ -408,6 +424,7 @@ async function main() { console.log('Examples:'); console.log(' NPM_OTP=123456 pnpm run publish:packages -- --yes'); console.log(' pnpm run publish:packages -- --tag beta --version 4.0.0-beta.0 --yes'); + console.log(' pnpm run publish:packages -- --tag latest --version 4.0.0 --yes'); } module.exports = { @@ -415,6 +432,7 @@ module.exports = { buildPackages, publishPackages, incrementVersion, + promoteToStable, resolveNpmTag, CORE_PUBLISH_PACKAGES, }; diff --git a/cli/tests/publish-version.test.js b/cli/tests/publish-version.test.js index 1eb4eafe..64ecbeb7 100644 --- a/cli/tests/publish-version.test.js +++ b/cli/tests/publish-version.test.js @@ -1,31 +1,11 @@ const { describe, it } = require('node:test'); const assert = require('node:assert/strict'); +const fs = require('fs'); +const path = require('path'); -// incrementVersion is not exported — mirror logic for regression tests -function incrementVersion(version, type) { - const base = String(version).split('-')[0]; - const parts = base.split('.').map((p) => parseInt(p, 10)); - while (parts.length < 3) parts.push(0); - const major = Number.isFinite(parts[0]) ? parts[0] : 0; - const minor = Number.isFinite(parts[1]) ? parts[1] : 0; - const patch = Number.isFinite(parts[2]) ? parts[2] : 0; - - switch (type) { - case 'major': - return `${major + 1}.0.0`; - case 'minor': - return `${major}.${minor + 1}.0`; - case 'patch': - return `${major}.${minor}.${patch + 1}`; - case 'beta': { - const match = version.match(/^(.*)-beta\.(\d+)$/); - if (match) return `${match[1]}-beta.${parseInt(match[2], 10) + 1}`; - return `${base}-beta.0`; - } - default: - return version; - } -} +const { incrementVersion, promoteToStable, resolveNpmTag, CORE_PUBLISH_PACKAGES } = require('../out/lib/publish'); + +const REPO_ROOT = path.join(__dirname, '..', '..'); describe('publish version bump', () => { it('bumps patch', () => { @@ -43,4 +23,57 @@ describe('publish version bump', () => { it('bumps beta prerelease', () => { assert.equal(incrementVersion('3.0.0-beta.1', 'beta'), '3.0.0-beta.2'); }); + + it('promotes beta to stable without bumping patch', () => { + assert.equal(promoteToStable('4.0.0-beta.18'), '4.0.0'); + assert.equal(incrementVersion('4.0.0-beta.18', 'stable'), '4.0.0'); + }); + + it('promoteToStable is a no-op for already-stable versions', () => { + assert.equal(promoteToStable('4.0.0'), '4.0.0'); + assert.equal(incrementVersion('4.0.0', 'stable'), '4.0.0'); + }); +}); + +describe('resolveNpmTag for stable promotion', () => { + it('maps stable semver to latest by default', () => { + assert.equal(resolveNpmTag('4.0.0'), 'latest'); + }); + + it('maps prerelease semver to beta by default', () => { + assert.equal(resolveNpmTag('4.0.0-beta.18'), 'beta'); + }); + + it('honors explicit tag override', () => { + assert.equal(resolveNpmTag('4.0.0-beta.18', 'latest'), 'latest'); + assert.equal(resolveNpmTag('4.0.0', 'beta'), 'beta'); + }); +}); + +describe('4.0.0 stable release consistency', () => { + it('keeps core package versions aligned at 4.0.0 without prerelease', () => { + const versions = new Map(); + for (const pkg of CORE_PUBLISH_PACKAGES) { + const pkgJson = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, pkg.path, 'package.json'), 'utf8')); + versions.set(pkg.name, pkgJson.version); + assert.equal(pkgJson.version, '4.0.0', `${pkg.name} must be 4.0.0 for stable @latest`); + assert.equal(pkgJson.version.includes('-'), false, `${pkg.name} must not carry a prerelease suffix`); + } + + const rootVersion = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'package.json'), 'utf8')).version; + const desktopVersion = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'desktop/package.json'), 'utf8')).version; + + assert.equal(rootVersion, '4.0.0'); + assert.equal(desktopVersion, '4.0.0'); + assert.equal(versions.get('@fecommunity/reactpress'), '4.0.0'); + }); + + it('defaults docs install helpers to latest / 4.0.0', () => { + const packageVersions = fs.readFileSync(path.join(REPO_ROOT, 'docs/src/npm/packageVersions.ts'), 'utf8'); + assert.match(packageVersions, /latest:\s*'4\.0\.0'/); + assert.match(packageVersions, /buildInstallCommand\(tag:\s*'beta'\s*\|\s*'latest'\s*=\s*'latest'\)/); + + const quickStart = fs.readFileSync(path.join(REPO_ROOT, 'docs/src/constants/quickStartCommands.ts'), 'utf8'); + assert.match(quickStart, /buildInstallCommand\('latest'\)/); + }); }); diff --git a/desktop/package.json b/desktop/package.json index 20b17f65..87cf8db4 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,6 +1,6 @@ { "name": "@fecommunity/reactpress-desktop", - "version": "4.0.0-beta.18", + "version": "4.0.0", "private": true, "description": "ReactPress desktop client — offline writing with SQLite, sync to production API", "main": "out/main/index.js", diff --git a/docs/blog/changelog.md b/docs/blog/changelog.md index 9de131dc..890ca154 100644 --- a/docs/blog/changelog.md +++ b/docs/blog/changelog.md @@ -8,9 +8,19 @@ tags: [reactpress, release] +## [4.0.0](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.18...v4.0.0) (2026-08-09) + +**ReactPress 4.0.0 stable** — npm `@latest` ([#88](https://github.com/fecommunity/reactpress/issues/88)). Install: `npm i -g @fecommunity/reactpress`. + +- **Release**: promotes 4.x from `@beta` to `@latest` +- **Docs / README / Admin**: default install path is stable 4.0.0 +- **Publish CLI**: `promote to stable` version mode; `resolveNpmTag` maps `4.0.0` → `latest` + +--- + ## [4.0.0-beta.18](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.0...v4.0.0-beta.18) (2026-07-12) -**ReactPress 4.0 beta.18** — current npm `@beta`. Install: `npm i -g @fecommunity/reactpress@beta`. +**ReactPress 4.0 beta.18** — npm `@beta` at the time. Install: `npm i -g @fecommunity/reactpress@beta`. - **CLI**: zero-dependency bundled runtime, theme install/proxy improvements, `doctor` / logging polish - **Desktop**: cross-platform installer workflow; uploads to GitHub Releases on publish diff --git a/docs/blog/nextjs-blog-seo-checklist-reactpress.md b/docs/blog/nextjs-blog-seo-checklist-reactpress.md index 52f85f5d..67174dfb 100644 --- a/docs/blog/nextjs-blog-seo-checklist-reactpress.md +++ b/docs/blog/nextjs-blog-seo-checklist-reactpress.md @@ -151,7 +151,7 @@ Theme guidance: [Appearance & themes](/docs/user-guide/appearance-themes) · [Th | Fast local proof | `reactpress init` ~60s | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/docs/blog/reactpress-vs-strapi-payload-headless-cms.md b/docs/blog/reactpress-vs-strapi-payload-headless-cms.md index 3734db2c..bec94267 100644 --- a/docs/blog/reactpress-vs-strapi-payload-headless-cms.md +++ b/docs/blog/reactpress-vs-strapi-payload-headless-cms.md @@ -79,7 +79,7 @@ With Strapi/Payload you assemble those layers. Many teams underestimate that ass ReactPress ships the layers as one CLI: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` diff --git a/docs/blog/self-hosted-nextjs-cms-blog-guide.md b/docs/blog/self-hosted-nextjs-cms-blog-guide.md index 60b07834..d667456c 100644 --- a/docs/blog/self-hosted-nextjs-cms-blog-guide.md +++ b/docs/blog/self-hosted-nextjs-cms-blog-guide.md @@ -75,7 +75,7 @@ ReactPress is an open-source **publishing system for React developers**: - Optional Electron desktop for offline writing ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -148,14 +148,14 @@ No. Many blogs run on a single VM. Yes — Headless API + API keys. See [Headless API](/docs/developer-guide/headless-api). **Is 4.0 production-ready?** -Active beta; stage first. [FAQ](/docs/reference/faq) · [Migration 3→4](/docs/tutorial-extras/migration-3-to-4). +Yes — 4.0.0 is stable. Stage first when upgrading from 3.x. [FAQ](/docs/reference/faq) · [Migration 3→4](/docs/tutorial-extras/migration-3-to-4). --- ## Start here ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/docs/blog/why-react-still-doesnt-have-wordpress-reactpress-4.md b/docs/blog/why-react-still-doesnt-have-wordpress-reactpress-4.md index 24e9ab23..8209cca4 100644 --- a/docs/blog/why-react-still-doesnt-have-wordpress-reactpress-4.md +++ b/docs/blog/why-react-still-doesnt-have-wordpress-reactpress-4.md @@ -95,7 +95,7 @@ This article is a long-form field guide. It explains: | **Current release** | 4.0 (codename **Extend**) — plugins, desktop, npm theme catalog. | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -473,7 +473,7 @@ Hard rules: ### 4.5 Thirty-second start ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -1265,7 +1265,7 @@ CLI generates `.env` from `.reactpress/config.json`. Avoid hand-editing unless y ### 15.1 New sites ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -1277,7 +1277,7 @@ Fastest path to a **React publishing platform** proof of concept. 4.0 adds plugins, desktop, npm theme catalog — **no forced breaking config migration**. ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress cd your-site reactpress doctor ``` @@ -1410,7 +1410,7 @@ Yes. MIT license. Commercial use allowed. Self-host without vendor fees. ### Is 4.0 production-ready? -4.0 is moving from beta to stable on npm (`@fecommunity/reactpress`). Core paths (`init`, Admin, API, theme, plugins) are battle-tested in community and dogfood sites like [blog.gaoredu.com](https://blog.gaoredu.com). Validate on staging; read [migration guide](/docs/tutorial-extras/migration-3-to-4). +Yes. 4.0.0 is the current stable release on npm (`@fecommunity/reactpress`). Core paths (`init`, Admin, API, theme, plugins) are battle-tested in community and dogfood sites like [blog.gaoredu.com](https://blog.gaoredu.com). When upgrading from 3.x, validate on staging; read [migration guide](/docs/tutorial-extras/migration-3-to-4). ### Do I need Docker? @@ -1475,10 +1475,10 @@ No. It is optional for offline/local-first authors. Web Admin is complete. ### 19.1 Install CLI ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` -4.x may publish under `@beta` before `@latest` promotion — check [npm](https://www.npmjs.com/package/@fecommunity/reactpress). +Install with `npm i -g @fecommunity/reactpress` (`@latest`). Prereleases use `@beta` — check [npm](https://www.npmjs.com/package/@fecommunity/reactpress). ### 19.2 Initialize site @@ -1868,7 +1868,7 @@ This appendix narrates a realistic **first week** deploying ReactPress as a **Wo The lead engineer runs: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir acme-blog && cd acme-blog reactpress init ``` @@ -2399,7 +2399,7 @@ Saying no keeps ReactPress a **publishing platform** instead of an everything ba ```bash # Install -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress # New site mkdir site && cd site && reactpress init @@ -2541,7 +2541,7 @@ We are not claiming 60,000 plugins tomorrow. We are claiming the **mechanism and If you searched for **React CMS**, **Next.js CMS**, **WordPress alternative**, **open source CMS**, or **React publishing platform** — start here: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/docs/blog/wordpress-alternatives-for-react-developers-2026.md b/docs/blog/wordpress-alternatives-for-react-developers-2026.md index 672ba044..0cfd0f40 100644 --- a/docs/blog/wordpress-alternatives-for-react-developers-2026.md +++ b/docs/blog/wordpress-alternatives-for-react-developers-2026.md @@ -58,7 +58,7 @@ Few tools hit all five. Here is how the common choices score. | License | MIT | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` diff --git a/docs/i18n/en/code.json b/docs/i18n/en/code.json index 7ee99f9e..e0a19140 100644 --- a/docs/i18n/en/code.json +++ b/docs/i18n/en/code.json @@ -595,8 +595,8 @@ "全局安装后,初始化、开发、自检与状态查看都在命令行里完成。": { "message": "After a global install, initialize, develop, self-check, and view status from the terminal." }, - "全局安装 @fecommunity/reactpress@beta,init / doctor / logs / stop 一条命令搞定。": { - "message": "Global install @fecommunity/reactpress@beta — init, doctor, logs, and stop from one CLI." + "全局安装 @fecommunity/reactpress,init / doctor / logs / stop 一条命令搞定。": { + "message": "Global install @fecommunity/reactpress — init, doctor, logs, and stop from one CLI." }, "全局安装 @fecommunity/reactpress@3,init / dev / doctor / status 一条命令搞定。": { "message": "After a global install, initialize, develop, self-check, and view status from the terminal." diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/build-nextjs-blog-in-60-seconds.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/build-nextjs-blog-in-60-seconds.md index 72e74d91..9dfce014 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/build-nextjs-blog-in-60-seconds.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/build-nextjs-blog-in-60-seconds.md @@ -41,7 +41,7 @@ Docker is **not** required. Default database is embedded **SQLite**. ## Step 1 — Install the CLI (~15s) ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` Package: [@fecommunity/reactpress](https://www.npmjs.com/package/@fecommunity/reactpress). diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/first-site.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/first-site.md index 3c89eab2..2e00677d 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/first-site.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/first-site.md @@ -12,7 +12,7 @@ This tutorial is for **first-time ReactPress end users**. No repository clone or ## Step 1: Install the CLI ```bash -npm install -g @fecommunity/reactpress@beta +npm install -g @fecommunity/reactpress ``` ## Step 2: Initialize the site diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/installation.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/installation.md index e4c1ee11..6d819df9 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/installation.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/installation.md @@ -30,10 +30,10 @@ node -v # should show v20.x or higher ## Install the CLI (recommended) ```bash -npm install -g @fecommunity/reactpress@beta +npm install -g @fecommunity/reactpress ``` -> npm **`@beta`** is the 4.x pre-release tag; `@latest` is still 3.x. There is no `@4` dist-tag. +> 4.0 stable is on npm **`@latest`**. Use `@beta` for prereleases. There is no `@4` dist-tag. The first `npm install -g` triggers `postinstall`, which downloads bundled server runtime dependencies (~1–2 minutes). diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/reactpress-vs-wordpress.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/reactpress-vs-wordpress.md index 2363f464..0e0c313b 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/reactpress-vs-wordpress.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/reactpress-vs-wordpress.md @@ -29,7 +29,7 @@ New to the product? Start with [What is ReactPress?](./what-is-reactpress.md). | -------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | **Positioning** | Full **publishing system for React developers** (Admin + API + Next.js themes + plugins + desktop) | World’s most popular PHP CMS; huge plugin/theme market | | **Stack** | React, Next.js, NestJS, SQLite / MySQL | PHP, MySQL, classic themes | -| **Time to live** | `npm i -g @fecommunity/reactpress@beta` → `reactpress init` — ~**60 seconds** | One-click host or LAMP — often minutes | +| **Time to live** | `npm i -g @fecommunity/reactpress` → `reactpress init` — ~**60 seconds** | One-click host or LAMP — often minutes | | **Editing** | Markdown-first Admin; familiar post/page/media model | Gutenberg blocks; enormous editor ecosystem | | **Visitor delivery** | Next.js SSR / ISR by default | PHP themes; caching plugins common | | **Headless** | First-class REST + TypeScript toolkit | REST exists; Headless usually extra setup | @@ -152,7 +152,7 @@ Ship a proof in a minute: [Build a Next.js blog in 60 seconds](./build-nextjs-bl ## Try ReactPress ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -173,7 +173,7 @@ This ReactPress is **fecommunity/reactpress** — a NestJS + Next.js publishing Yes — MIT. Install from npm. **Is 4.0 production-ready?** -Active beta with stable core paths. Read [3.x → 4.0 migration](../tutorial-extras/migration-3-to-4.md) and validate on staging. +Yes — 4.0.0 is stable (`@latest`). Read [3.x → 4.0 migration](../tutorial-extras/migration-3-to-4.md) when upgrading from 3.x and validate on staging. **Can I use my own frontend?** Yes — Headless REST + API keys. diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/self-hosted-cms-for-react.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/self-hosted-cms-for-react.md index 89fa22aa..1b644212 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/self-hosted-cms-for-react.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/self-hosted-cms-for-react.md @@ -24,7 +24,7 @@ Looking for a **self-hosted CMS for React** — not a SaaS Headless plan, not a **ReactPress** is an open-source, **self-hosted publishing platform** for React developers: Admin + NestJS API + Next.js themes + plugins + optional desktop client, all started from one CLI. Your content and media stay on **your** machine or server. ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-cms && cd my-cms reactpress init ``` @@ -139,7 +139,7 @@ No. Many sites run as a single Node host with SQLite or MySQL. Yes — export via API, migrate DB files, or point a new theme at the same API. **Is 4.0 ready for self-hosted production?** -Core `init` / `doctor` paths are stable in active beta; stage first and read [3.x → 4.0 migration](../tutorial-extras/migration-3-to-4.md). More: [FAQ](../reference/faq.md). +4.0.0 is stable; when upgrading from 3.x, stage first and read [3.x → 4.0 migration](../tutorial-extras/migration-3-to-4.md). More: [FAQ](../reference/faq.md). ## From the blog diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/what-is-reactpress.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/what-is-reactpress.md index f5703d40..34935c47 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/what-is-reactpress.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/getting-started/what-is-reactpress.md @@ -33,7 +33,7 @@ One global CLI ships: | **CLI** | `init` · `doctor` · `logs` · `stop` — live in about **60 seconds** | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -106,13 +106,13 @@ ReactPress here is the **fecommunity open-source publishing platform** (NestJS + ## Quick answers -| Question | Answer | -| -------------------------- | ---------------------------------------------------------------------------------------- | -| Is it free? | Yes — MIT open source | -| Do I need Docker? | No by default (SQLite). Docker only for embedded-docker / external MySQL | -| Is it production-ready? | 4.0 is active beta; validate on staging — see [FAQ](../reference/faq.md) | -| Can I use my own frontend? | Yes — Headless REST + API keys | -| vs WordPress? | Same editing idea, React/Next delivery — [full comparison](./reactpress-vs-wordpress.md) | +| Question | Answer | +| -------------------------- | ------------------------------------------------------------------------------------------------- | +| Is it free? | Yes — MIT open source | +| Do I need Docker? | No by default (SQLite). Docker only for embedded-docker / external MySQL | +| Is it production-ready? | 4.0.0 is stable (`@latest`); stage first when upgrading from 3.x — see [FAQ](../reference/faq.md) | +| Can I use my own frontend? | Yes — Headless REST + API keys | +| vs WordPress? | Same editing idea, React/Next delivery — [full comparison](./reactpress-vs-wordpress.md) | ## Start here diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/intro.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/intro.md index ff8a3d40..9982a3a5 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/intro.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/intro.md @@ -36,7 +36,7 @@ Choose a starting point by role. Every doc includes an SEO summary and next-step **ReactPress** is **the publishing system for React developers** — build blogs, documentation, company websites, and content-driven applications with React. One CLI ships CMS API, Web Admin, swappable Next.js themes, plugins, and an Electron desktop client. -**ReactPress 4.0** (codename **Extend**) adds a **plugin system**, **desktop client**, and **npm theme catalog** on top of 3.x. New users: `npm i -g @fecommunity/reactpress@beta`. See [ReactPress 4.0 Extend](./tutorial-extras/reactpress-4-0.md). Install the desktop app: [Desktop client](./tutorial-extras/desktop-client.md). Still on 3.x? See [ReactPress 3.0 Platform](./tutorial-extras/reactpress-3-0.md). +**ReactPress 4.0** (codename **Extend**) adds a **plugin system**, **desktop client**, and **npm theme catalog** on top of 3.x. New users: `npm i -g @fecommunity/reactpress`. See [ReactPress 4.0 Extend](./tutorial-extras/reactpress-4-0.md). Install the desktop app: [Desktop client](./tutorial-extras/desktop-client.md). Still on 3.x? See [ReactPress 3.0 Platform](./tutorial-extras/reactpress-3-0.md). ## 🆚 Comparison @@ -87,7 +87,7 @@ Choose a starting point by role. Every doc includes an SEO summary and next-step ### End users — one global package ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -170,7 +170,7 @@ The publishing system for React developers — build blogs, documentation, compa
Is ReactPress free? -Yes. MIT licensed. Install with `npm i -g @fecommunity/reactpress@beta`. +Yes. MIT licensed. Install with `npm i -g @fecommunity/reactpress`.
diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/faq.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/faq.md index 50cd0e7e..5a996557 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/faq.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/faq.md @@ -90,7 +90,7 @@ Content can be exported and re-imported via scripts or integrated through the He
Is ReactPress free? -Yes. ReactPress is open source under the MIT license. Install globally: `npm i -g @fecommunity/reactpress@beta`. +Yes. ReactPress is open source under the MIT license. Install globally: `npm i -g @fecommunity/reactpress`.
@@ -99,7 +99,7 @@ Yes. ReactPress is open source under the MIT license. Install globally: `npm i -
Is 4.0 production-ready? -4.0 is in active beta. Before upgrading production, read [3.x → 4.0 migration](../tutorial-extras/migration-3-to-4.md) and validate on staging. Core paths `init` / `doctor` are stable. +4.0.0 is the current stable release (npm `@latest`). When upgrading from 3.x, read [3.x → 4.0 migration](../tutorial-extras/migration-3-to-4.md) and validate on staging.
diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/troubleshooting.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/troubleshooting.md index 41a2cb8c..71772d85 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/troubleshooting.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/reference/troubleshooting.md @@ -16,13 +16,13 @@ reactpress logs --tail 100 ## Diagnostic command cheat sheet -| Command | Purpose | -|------|------| -| `reactpress doctor` | Environment, ports, DB, processes overview | -| `reactpress doctor --show-logs` | Attach log snippet on failure | -| `reactpress logs -f` | Follow API logs live | -| `reactpress logs --grep error` | Filter error lines | -| `reactpress stop` | Clean stop before restart | +| Command | Purpose | +| ------------------------------- | ------------------------------------------ | +| `reactpress doctor` | Environment, ports, DB, processes overview | +| `reactpress doctor --show-logs` | Attach log snippet on failure | +| `reactpress logs -f` | Follow API logs live | +| `reactpress logs --grep error` | Filter error lines | +| `reactpress stop` | Clean stop before restart | Monorepo: `pnpm status`, `pnpm docker:dev:logs` @@ -34,7 +34,7 @@ Bundled runtime download failed during global install: ```bash # retry install -npm install -g @fecommunity/reactpress@beta --force +npm install -g @fecommunity/reactpress --force # check proxy and registry npm config get registry @@ -71,11 +71,11 @@ Change ports: [Configuration](../tutorial-extras/config-intro.md). ### API up but Admin / theme unreachable -| Symptom | Likely cause | Fix | -|------|----------|------| -| :3000 won't open | web process not started | Monorepo: `pnpm dev:web`; check logs | -| :3001 blank | theme not enabled | Admin → Appearance → enable theme | -| CORS error | URL mismatch | verify `CLIENT_SITE_URL` / `SERVER_SITE_URL` | +| Symptom | Likely cause | Fix | +| ---------------- | ----------------------- | -------------------------------------------- | +| :3000 won't open | web process not started | Monorepo: `pnpm dev:web`; check logs | +| :3001 blank | theme not enabled | Admin → Appearance → enable theme | +| CORS error | URL mismatch | verify `CLIENT_SITE_URL` / `SERVER_SITE_URL` | ### Theme process REACTPRESS_THEME_NOT_FOUND diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/deploy-your-site.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/deploy-your-site.md index 601148e5..e05e6fcd 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/deploy-your-site.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/deploy-your-site.md @@ -10,7 +10,7 @@ keywords: [reactpress, production, deploy, nginx, start, build] With Node ≥ 18 and Docker (or external MySQL) on your server: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress cd /path/to/your-site # project with .reactpress/ reactpress init # if not initialized yet reactpress build @@ -76,11 +76,11 @@ pm2 restart all 4.0 global CLI ships a **bundled API + theme-embedded Admin** (`reactpress init`). Split-process deployment is mainly for **Monorepo contributors** or sites still on the 3.x CLI: -| Scenario | Notes | -|----------|-------| -| Full stack (end users) | `reactpress init` | +| Scenario | Notes | +| -------------------------- | ---------------------------------------------------------------------------------------------------- | +| Full stack (end users) | `reactpress init` | | API-only / split processes | Monorepo: `pnpm dev:api`, etc. — see [Monorepo development](../developer-guide/local-development.md) | -| Desktop app | `pnpm build:desktop` (local SQLite, not server deployment) | +| Desktop app | `pnpm build:desktop` (local SQLite, not server deployment) | `@fecommunity/reactpress-server` is deprecated — do not use it for new projects. diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/start.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/start.md index d823fe27..ef525e4e 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/start.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-basics/start.md @@ -9,28 +9,28 @@ keywords: [reactpress, local development, dev, pnpm, monorepo] ReactPress 4.0 offers three local paths — choose by scenario. -| Scenario | Approach | Prerequisites | -|----------|----------|-----------------| -| **Build / try a site (recommended)** | Global `reactpress init` | Node ≥ 20 | -| **Offline writing** | Desktop client | See [Desktop client](../tutorial-extras/desktop-client.md) | -| **Contribute to monorepo** | `pnpm dev` | Node ≥ 20, pnpm | +| Scenario | Approach | Prerequisites | +| ------------------------------------ | ------------------------ | ---------------------------------------------------------- | +| **Build / try a site (recommended)** | Global `reactpress init` | Node ≥ 20 | +| **Offline writing** | Desktop client | See [Desktop client](../tutorial-extras/desktop-client.md) | +| **Contribute to monorepo** | `pnpm dev` | Node ≥ 20, pnpm | ## Option 1: Global CLI (recommended) ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` `init` generates config, initializes SQLite, and **auto-starts** the full stack. -| Service | Port | URL | -|---------|------|-----| -| Admin | 3001 `/admin/` | http://localhost:3001/admin/ | -| Visitor theme | 3001 | http://localhost:3001 | -| API | 3002 | http://localhost:3002/api/health | -| Theme preview | 3003 | http://localhost:3003 | +| Service | Port | URL | +| ------------- | -------------- | -------------------------------- | +| Admin | 3001 `/admin/` | http://localhost:3001/admin/ | +| Visitor theme | 3001 | http://localhost:3001 | +| API | 3002 | http://localhost:3002/api/health | +| Theme preview | 3003 | http://localhost:3003 | ### Common commands diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/migration-3-to-4.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/migration-3-to-4.md index f0b199b8..22b27de6 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/migration-3-to-4.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/migration-3-to-4.md @@ -14,7 +14,7 @@ See [ReactPress 4.0 Extend](./reactpress-4-0.md) for the full overview. ## Upgrade steps ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress cd your-site reactpress doctor ``` diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/reactpress-4-0.md b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/reactpress-4-0.md index 062d2290..5371a81f 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/reactpress-4-0.md +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/tutorial-extras/reactpress-4-0.md @@ -11,27 +11,27 @@ keywords: [reactpress 4.0, extend, plugin, desktop, theme catalog, wordpress alt 4.0 (codename **Extend**) builds on the [3.0 Platform](./reactpress-3-0.md) and [3.1 Toolkit theme refactor](/blog/changelog) with three major additions: -| Focus | What you feel | 4.0 delivery | -|------|----------|----------| -| **Plugins** | Extend like WordPress plugins | Hooks + `plugin.json` + Admin slots; built-in SEO and auto-summary | -| **Desktop** | Write and manage without a browser | Electron shell + SQLite local mode, sync to remote | -| **Themes** | Official themes from npm in one command | `theme-starter` catalog + hello-world starter | +| Focus | What you feel | 4.0 delivery | +| ----------- | --------------------------------------- | ------------------------------------------------------------------ | +| **Plugins** | Extend like WordPress plugins | Hooks + `plugin.json` + Admin slots; built-in SEO and auto-summary | +| **Desktop** | Write and manage without a browser | Electron shell + SQLite local mode, sync to remote | +| **Themes** | Official themes from npm in one command | `theme-starter` catalog + hello-world starter | ## Quick start (full stack, same as 3.x) ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` -| Service | Port | Description | -|------|------|------| -| Admin | 3001 `/admin/` | `reactpress init` default | -| Site theme | 3001 | Active Next.js theme | -| API | 3002 | NestJS REST | -| Theme preview | 3003 | Admin iframe preview | -| Admin (Monorepo dev) | 3000 | Standalone Vite dev server | +| Service | Port | Description | +| -------------------- | -------------- | -------------------------- | +| Admin | 3001 `/admin/` | `reactpress init` default | +| Site theme | 3001 | Active Next.js theme | +| API | 3002 | NestJS REST | +| Theme preview | 3003 | Admin iframe preview | +| Admin (Monorepo dev) | 3000 | Standalone Vite dev server | ## Desktop client (new) @@ -42,12 +42,12 @@ reactpress init pnpm dev:desktop ``` -| Item | Description | -|----|------| -| Embedded API | SQLite, default `http://127.0.0.1:3002/api` | -| Default account | `admin` / `admin` | -| Remote mode | Settings → Desktop client, connect to existing API | -| Sync | Push local content to remote site | +| Item | Description | +| --------------- | -------------------------------------------------- | +| Embedded API | SQLite, default `http://127.0.0.1:3002/api` | +| Default account | `admin` / `admin` | +| Remote mode | Settings → Desktop client, connect to existing API | +| Sync | Push local content to remote site | Build: `pnpm build:desktop` → `desktop/release/`. @@ -57,28 +57,28 @@ See [desktop/README.md](https://github.com/fecommunity/reactpress/blob/master/de ## Plugin system (new) -| Command / entry | Description | -|-------------|------| -| Admin → Plugins | Install, enable, configure | -| `reactpress plugin list` | View registry | -| `reactpress plugin install hello-world` | CLI install | +| Command / entry | Description | +| --------------------------------------- | -------------------------- | +| Admin → Plugins | Install, enable, configure | +| `reactpress plugin list` | View registry | +| `reactpress plugin install hello-world` | CLI install | Built-in plugins: -| id | Capability | -|----|------| -| `hello-world` | Auto-generate summary on publish | -| `seo` | Slug, keywords, meta description; Admin slot in post editor | -| `image-optimizer` | Historical media analysis and batch WebP optimization | +| id | Capability | +| ----------------- | ----------------------------------------------------------- | +| `hello-world` | Auto-generate summary on publish | +| `seo` | Slug, keywords, meta description; Admin slot in post editor | +| `image-optimizer` | Historical media analysis and batch WebP optimization | See [plugins/README.md](https://github.com/fecommunity/reactpress/blob/master/plugins/README.md) for plugin development. ## Themes (enhanced) -| Theme | Source | Use case | -|------|------|------| -| hello-world | repo local | Learning, fork and customize | -| reactpress-theme-starter | npm | Production (search, knowledge base, comments) | +| Theme | Source | Use case | +| ------------------------ | ---------- | --------------------------------------------- | +| hello-world | repo local | Learning, fork and customize | +| reactpress-theme-starter | npm | Production (search, knowledge base, comments) | ```bash reactpress theme add @fecommunity/reactpress-theme-starter@1.0.0-beta.0 @@ -86,13 +86,13 @@ reactpress theme add @fecommunity/reactpress-theme-starter@1.0.0-beta.0 ## Common commands (4.0 additions) -| Command | Description | -|------|------| -| `pnpm dev:desktop` | Desktop dev (SQLite + Electron) | -| `pnpm build:desktop` | Build desktop installer | -| `pnpm build:plugins` | Compile official plugins | -| `reactpress plugin list/install` | Plugin CLI | -| `reactpress desktop dev` | Same as `dev:desktop` (monorepo) | +| Command | Description | +| -------------------------------- | -------------------------------- | +| `pnpm dev:desktop` | Desktop dev (SQLite + Electron) | +| `pnpm build:desktop` | Build desktop installer | +| `pnpm build:plugins` | Compile official plugins | +| `reactpress plugin list/install` | Plugin CLI | +| `reactpress desktop dev` | Same as `dev:desktop` (monorepo) | ## Upgrade from 3.x diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/changelog.md b/docs/i18n/zh/docusaurus-plugin-content-blog/changelog.md index 7359aaf2..2af1b989 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-blog/changelog.md +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/changelog.md @@ -8,9 +8,21 @@ tags: [reactpress, release] +## [4.0.0](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.18...v4.0.0) (2026-08-09) + +**ReactPress 4.0.0 稳定版** — npm `@latest`([#88](https://github.com/fecommunity/reactpress/issues/88))。安装:`npm i -g @fecommunity/reactpress`。 + +### 亮点 + +- **发布**:4.x 从 `@beta` 提升为 `@latest` +- **文档 / README / Admin**:默认安装路径为稳定版 4.0.0 +- **发布 CLI**:支持 `promote to stable`;`resolveNpmTag` 将 `4.0.0` 映射到 `latest` + +--- + ## [4.0.0-beta.18](https://github.com/fecommunity/reactpress/compare/v4.0.0-beta.0...v4.0.0-beta.18) (2026-07-12) -**ReactPress 4.0 beta.18** — 当前 npm `@beta` 标签。安装:`npm i -g @fecommunity/reactpress@beta`。 +**ReactPress 4.0 beta.18** — 当时 npm `@beta` 标签。安装:`npm i -g @fecommunity/reactpress@beta`。 ### 亮点 diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/nextjs-blog-seo-checklist-reactpress.md b/docs/i18n/zh/docusaurus-plugin-content-blog/nextjs-blog-seo-checklist-reactpress.md index 91b34915..f9bc547d 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-blog/nextjs-blog-seo-checklist-reactpress.md +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/nextjs-blog-seo-checklist-reactpress.md @@ -151,7 +151,7 @@ ReactPress **image-optimizer** 插件可辅助批量 WebP — 再配合主题里 | 本地快速验证 | `reactpress init` 约 60 秒 | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/reactpress-vs-strapi-payload-headless-cms.md b/docs/i18n/zh/docusaurus-plugin-content-blog/reactpress-vs-strapi-payload-headless-cms.md index c311d25c..c780160f 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-blog/reactpress-vs-strapi-payload-headless-cms.md +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/reactpress-vs-strapi-payload-headless-cms.md @@ -79,7 +79,7 @@ Strapi、Payload(及同类)在这些场景很强: ReactPress 用一条 CLI 把这些层接好: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/self-hosted-nextjs-cms-blog-guide.md b/docs/i18n/zh/docusaurus-plugin-content-blog/self-hosted-nextjs-cms-blog-guide.md index 03dca5d6..2e087412 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-blog/self-hosted-nextjs-cms-blog-guide.md +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/self-hosted-nextjs-cms-blog-guide.md @@ -75,7 +75,7 @@ ReactPress 是面向 React 开发者的开源**发布系统**: - 可选 Electron 桌面端离线写作 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -148,14 +148,14 @@ reactpress init 可以 — Headless API + API Key。见 [Headless API](/zh/docs/developer-guide/headless-api)。 **4.0 能上生产吗?** -active beta;请先预发。[FAQ](/zh/docs/reference/faq) · [3→4 迁移](/zh/docs/tutorial-extras/migration-3-to-4)。 +4.0.0 稳定版;从 3.x 升级请先预发。[FAQ](/zh/docs/reference/faq) · [3→4 迁移](/zh/docs/tutorial-extras/migration-3-to-4)。 --- ## 从这里开始 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/why-react-still-doesnt-have-wordpress-reactpress-4.md b/docs/i18n/zh/docusaurus-plugin-content-blog/why-react-still-doesnt-have-wordpress-reactpress-4.md index b4e04209..3de0fbe9 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-blog/why-react-still-doesnt-have-wordpress-reactpress-4.md +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/why-react-still-doesnt-have-wordpress-reactpress-4.md @@ -85,7 +85,7 @@ keywords: | **当前版本** | 4.0(代号 **Extend**)——插件、桌面、npm 主题 catalog | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -234,7 +234,7 @@ ReactPress 4.0 的每一项能力——bundled CLI、SQLite 默认、npm 主题 ### 4.3 三十秒上手 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -669,7 +669,7 @@ reactpress init ## 十九、快速开始 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -701,7 +701,7 @@ ReactPress 4.0 把这些原则翻译到 React 时代: 若你在搜索 **React CMS**、**Next.js CMS**、**WordPress alternative**、**open source CMS**——从这里开始: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-blog/wordpress-alternatives-for-react-developers-2026.md b/docs/i18n/zh/docusaurus-plugin-content-blog/wordpress-alternatives-for-react-developers-2026.md index 71589b54..8d160346 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-blog/wordpress-alternatives-for-react-developers-2026.md +++ b/docs/i18n/zh/docusaurus-plugin-content-blog/wordpress-alternatives-for-react-developers-2026.md @@ -58,7 +58,7 @@ WordPress 仍占据很大份额。但对 **React 开发者**来说,痛点很 | 许可 | MIT | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` diff --git a/docs/i18n/zh/docusaurus-plugin-content-pages/about.md b/docs/i18n/zh/docusaurus-plugin-content-pages/about.md index 2c9fc21f..beabeaba 100644 --- a/docs/i18n/zh/docusaurus-plugin-content-pages/about.md +++ b/docs/i18n/zh/docusaurus-plugin-content-pages/about.md @@ -22,7 +22,7 @@ keywords: [reactpress, 关于, 开源, react cms, 发布平台] ReactPress 4.0(代号 **Extend**)为当前推荐版本: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` ## 适用人群 diff --git a/docs/migration-3-to-4.md b/docs/migration-3-to-4.md index 8b9ad9aa..3a101fc3 100644 --- a/docs/migration-3-to-4.md +++ b/docs/migration-3-to-4.md @@ -8,19 +8,19 @@ ReactPress **4.0** 在 3.x 平台能力之上新增:**插件系统**、**Elect ## 谁需要读本文 -| 场景 | 是否需要迁移动作 | -|------|------------------| -| 已用 `reactpress dev` + MySQL 的全栈站点 | 可选升级 CLI;插件/桌面为增量能力 | -| Headless / 仅 API | 无 Breaking;可按需启用插件 | -| 主题作者 | 无 Breaking;继续 `theme.json` + Pages Router | -| 新用户 | 直接安装 `@fecommunity/reactpress@beta` | +| 场景 | 是否需要迁移动作 | +| ---------------------------------------- | --------------------------------------------- | +| 已用 `reactpress dev` + MySQL 的全栈站点 | 可选升级 CLI;插件/桌面为增量能力 | +| Headless / 仅 API | 无 Breaking;可按需启用插件 | +| 主题作者 | 无 Breaking;继续 `theme.json` + Pages Router | +| 新用户 | 直接安装 `@fecommunity/reactpress` | --- ## 升级 CLI ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress cd your-site reactpress doctor pnpm dev # 或 reactpress dev @@ -73,11 +73,11 @@ reactpress theme add @fecommunity/reactpress-theme-starter@1.0.0-beta.0 ## Breaking Changes(4.0) -| 变更 | 影响 | 处理 | -|------|------|------| -| 无强制 Breaking | 3.x 站点配置与 API 保持兼容 | 正常升级 CLI 即可 | -| 内置插件 `requires: ">=3.5.0"` | 仅影响插件 manifest 语义 | 使用 4.0 CLI 即可满足 | -| 移除 bundled 旧主题(my-blog、twentytwentyfive) | 若曾依赖仓库内旧主题 | 改用 hello-world 或 npm theme-starter | +| 变更 | 影响 | 处理 | +| ------------------------------------------------ | --------------------------- | ------------------------------------- | +| 无强制 Breaking | 3.x 站点配置与 API 保持兼容 | 正常升级 CLI 即可 | +| 内置插件 `requires: ">=3.5.0"` | 仅影响插件 manifest 语义 | 使用 4.0 CLI 即可满足 | +| 移除 bundled 旧主题(my-blog、twentytwentyfive) | 若曾依赖仓库内旧主题 | 改用 hello-world 或 npm theme-starter | --- diff --git a/docs/src/changelog/versions.en.ts b/docs/src/changelog/versions.en.ts index 97d9b99f..881ae497 100644 --- a/docs/src/changelog/versions.en.ts +++ b/docs/src/changelog/versions.en.ts @@ -6,71 +6,75 @@ export type ChangelogNavItem = { export const CHANGELOG_VERSIONS_EN: ChangelogNavItem[] = [ { - "id": "400-beta18-2026-07-12", - "label": "4.0.0-beta.18 (2026-07-12)" + id: '400-2026-08-09', + label: '4.0.0 (2026-08-09)', }, { - "id": "400-beta0-2026-06-27", - "label": "4.0.0-beta.0 (2026-06-27)" + id: '400-beta18-2026-07-12', + label: '4.0.0-beta.18 (2026-07-12)', }, { - "id": "370-2026-06-23", - "label": "3.7.0 (2026-06-23)" + id: '400-beta0-2026-06-27', + label: '4.0.0-beta.0 (2026-06-27)', }, { - "id": "360-2026-06-14", - "label": "3.6.0 (2026-06-14)" + id: '370-2026-06-23', + label: '3.7.0 (2026-06-23)', }, { - "id": "350-2026-06-14", - "label": "3.5.0 (2026-06-14)" + id: '360-2026-06-14', + label: '3.6.0 (2026-06-14)', }, { - "id": "340-2026-06-12", - "label": "3.4.0 (2026-06-12)" + id: '350-2026-06-14', + label: '3.5.0 (2026-06-14)', }, { - "id": "330-2026-06-07", - "label": "3.3.0 (2026-06-07)" + id: '340-2026-06-12', + label: '3.4.0 (2026-06-12)', }, { - "id": "320-2026-06-07", - "label": "3.2.0 (2026-06-07)" + id: '330-2026-06-07', + label: '3.3.0 (2026-06-07)', }, { - "id": "311-2026-06-07", - "label": "3.1.1 (2026-06-07)" + id: '320-2026-06-07', + label: '3.2.0 (2026-06-07)', }, { - "id": "310-2026-06-07", - "label": "3.1.0 (2026-06-07)" + id: '311-2026-06-07', + label: '3.1.1 (2026-06-07)', }, { - "id": "300-2026-05-17", - "label": "3.0.0 (2026-05-17)" + id: '310-2026-06-07', + label: '3.1.0 (2026-06-07)', }, { - "id": "201-2025-09-26", - "label": "2.0.1 (2025-09-26)" + id: '300-2026-05-17', + label: '3.0.0 (2026-05-17)', }, { - "id": "200-2025-09-21", - "label": "2.0.0 (2025-09-21)" + id: '201-2025-09-26', + label: '2.0.1 (2025-09-26)', }, { - "id": "1100-2025-08-03", - "label": "1.10.0 (2025-08-03)" + id: '200-2025-09-21', + label: '2.0.0 (2025-09-21)', }, { - "id": "190-2025-05-21", - "label": "1.9.0 (2025-05-21)" + id: '1100-2025-08-03', + label: '1.10.0 (2025-08-03)', }, { - "id": "180-2025-03-22", - "label": "1.8.0 (2025-03-22)" + id: '190-2025-05-21', + label: '1.9.0 (2025-05-21)', }, { - "id": "100-2024-09-28", - "label": "1.0.0 (2024-09-28)" - } + id: '180-2025-03-22', + label: '1.8.0 (2025-03-22)', + }, + { + id: '100-2024-09-28', + label: '1.0.0 (2024-09-28)', + }, ]; diff --git a/docs/src/changelog/versions.zh.ts b/docs/src/changelog/versions.zh.ts index e534600d..250ab135 100644 --- a/docs/src/changelog/versions.zh.ts +++ b/docs/src/changelog/versions.zh.ts @@ -6,71 +6,75 @@ export type ChangelogNavItem = { export const CHANGELOG_VERSIONS_ZH: ChangelogNavItem[] = [ { - "id": "400-beta18-2026-07-12", - "label": "4.0.0-beta.18 (2026-07-12)" + id: '400-2026-08-09', + label: '4.0.0 (2026-08-09)', }, { - "id": "400-beta0-2026-06-27", - "label": "4.0.0-beta.0 (2026-06-27)" + id: '400-beta18-2026-07-12', + label: '4.0.0-beta.18 (2026-07-12)', }, { - "id": "370-2026-06-23", - "label": "3.7.0 (2026-06-23)" + id: '400-beta0-2026-06-27', + label: '4.0.0-beta.0 (2026-06-27)', }, { - "id": "360-2026-06-14", - "label": "3.6.0 (2026-06-14)" + id: '370-2026-06-23', + label: '3.7.0 (2026-06-23)', }, { - "id": "350-2026-06-14", - "label": "3.5.0 (2026-06-14)" + id: '360-2026-06-14', + label: '3.6.0 (2026-06-14)', }, { - "id": "340-2026-06-12", - "label": "3.4.0 (2026-06-12)" + id: '350-2026-06-14', + label: '3.5.0 (2026-06-14)', }, { - "id": "330-2026-06-07", - "label": "3.3.0 (2026-06-07)" + id: '340-2026-06-12', + label: '3.4.0 (2026-06-12)', }, { - "id": "320-2026-06-07", - "label": "3.2.0 (2026-06-07)" + id: '330-2026-06-07', + label: '3.3.0 (2026-06-07)', }, { - "id": "311-2026-06-07", - "label": "3.1.1 (2026-06-07)" + id: '320-2026-06-07', + label: '3.2.0 (2026-06-07)', }, { - "id": "310-2026-06-07", - "label": "3.1.0 (2026-06-07)" + id: '311-2026-06-07', + label: '3.1.1 (2026-06-07)', }, { - "id": "300-2026-05-17", - "label": "3.0.0 (2026-05-17)" + id: '310-2026-06-07', + label: '3.1.0 (2026-06-07)', }, { - "id": "201-2025-09-26", - "label": "2.0.1 (2025-09-26)" + id: '300-2026-05-17', + label: '3.0.0 (2026-05-17)', }, { - "id": "200-2025-09-21", - "label": "2.0.0 (2025-09-21)" + id: '201-2025-09-26', + label: '2.0.1 (2025-09-26)', }, { - "id": "1100-2025-08-03", - "label": "1.10.0 (2025-08-03)" + id: '200-2025-09-21', + label: '2.0.0 (2025-09-21)', }, { - "id": "190-2025-05-21", - "label": "1.9.0 (2025-05-21)" + id: '1100-2025-08-03', + label: '1.10.0 (2025-08-03)', }, { - "id": "180-2025-03-22", - "label": "1.8.0 (2025-03-22)" + id: '190-2025-05-21', + label: '1.9.0 (2025-05-21)', }, { - "id": "100-2024-09-28", - "label": "1.0.0 (2024-09-28)" - } + id: '180-2025-03-22', + label: '1.8.0 (2025-03-22)', + }, + { + id: '100-2024-09-28', + label: '1.0.0 (2024-09-28)', + }, ]; diff --git a/docs/src/components/CliCommandBlock/index.tsx b/docs/src/components/CliCommandBlock/index.tsx index e17b85cc..44b3e588 100644 --- a/docs/src/components/CliCommandBlock/index.tsx +++ b/docs/src/components/CliCommandBlock/index.tsx @@ -1,10 +1,7 @@ import Translate, { translate } from '@docusaurus/Translate'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import { buildQuickStartCommands } from '@site/src/constants/quickStartCommands'; -import { - buildInstallCommand, - type ReactPressDistTags, -} from '@site/src/npm/packageVersions'; +import { buildInstallCommand, type ReactPressDistTags } from '@site/src/npm/packageVersions'; import { useReactPressVersions } from '@site/src/npm/useReactPressVersions'; import clsx from 'clsx'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; @@ -98,8 +95,7 @@ function CommandLine({ text }: { text: string }) { const [, subcommand] = text.split(' '); return ( <> - reactpress{' '} - {subcommand} + reactpress {subcommand} ); } @@ -107,10 +103,8 @@ function CommandLine({ text }: { text: string }) { if (text.includes('mkdir') && text.includes('cd')) { return ( <> - mkdir{' '} - my-blog{' '} - &&{' '} - cd{' '} + mkdir my-blog{' '} + && cd{' '} my-blog ); @@ -159,14 +153,8 @@ function SuccessLine({ text }: { text: string }) { return {text}; } -function resolveToolbarCwd( - history: { kind: string; text: string }[], - activeInput: string, -): string { - const entered = [ - ...history.filter((line) => line.kind === 'input').map((line) => line.text), - activeInput, - ]; +function resolveToolbarCwd(history: { kind: string; text: string }[], activeInput: string): string { + const entered = [...history.filter((line) => line.kind === 'input').map((line) => line.text), activeInput]; if (entered.some((line) => line.includes('cd my-blog') || line.trim() === 'reactpress init')) { return '~/my-blog'; } @@ -179,7 +167,7 @@ export default function CliCommandBlock({ showHint = variant !== 'hero', animate = variant === 'hero', showVersionSwitch = variant === 'hero', - defaultVersionTag = 'beta', + defaultVersionTag = 'latest', commands: commandsProp, copyCommand: copyCommandProp, installCommand: installCommandProp, @@ -191,31 +179,26 @@ export default function CliCommandBlock({ const [selectedTag, setSelectedTag] = useState(defaultVersionTag); const [copied, setCopied] = useState(false); - const managedInstallCommand = useMemo( - () => buildInstallCommand(selectedTag), - [selectedTag], - ); - const managedCommands = useMemo( - () => buildQuickStartCommands(managedInstallCommand), - [managedInstallCommand], - ); + const managedInstallCommand = useMemo(() => buildInstallCommand(selectedTag), [selectedTag]); + const managedCommands = useMemo(() => buildQuickStartCommands(managedInstallCommand), [managedInstallCommand]); const managedCopyCommand = useMemo(() => managedCommands.join('\n'), [managedCommands]); const selectedVersion = selectedTag === 'beta' ? beta : latest; const useManagedCommands = showVersionSwitch; - const installCommand = useManagedCommands - ? managedInstallCommand - : (installCommandProp ?? managedInstallCommand); + const installCommand = useManagedCommands ? managedInstallCommand : (installCommandProp ?? managedInstallCommand); const lines = useManagedCommands ? managedCommands : commandsProp && commandsProp.length > 0 ? commandsProp : managedCommands; - const copyCommand = useManagedCommands - ? managedCopyCommand - : (copyCommandProp ?? managedCopyCommand); + const copyCommand = useManagedCommands ? managedCopyCommand : (copyCommandProp ?? managedCopyCommand); - const { history, activeInput, isTyping, animate: isAnimating } = useCliTypewriter({ + const { + history, + activeInput, + isTyping, + animate: isAnimating, + } = useCliTypewriter({ enabled: animate, locale, commands: lines, @@ -283,7 +266,7 @@ export default function CliCommandBlock({
{showVersionSwitch && ( @@ -307,7 +290,7 @@ export default function CliCommandBlock({ className={clsx( styles.versionOption, styles.toolbarMono, - isActive && styles.versionOptionActive, + isActive && styles.versionOptionActive )} disabled={versionsLoading} aria-pressed={isActive} @@ -364,7 +347,7 @@ export default function CliCommandBlock({ line.kind === 'success' && styles.successRow, line.kind === 'divider' && styles.dividerRow, inReadyBlock && styles.readyBlock, - line.kind === 'success' && index === readyIndex + 1 && styles.readyHeadline, + line.kind === 'success' && index === readyIndex + 1 && styles.readyHeadline )} > {line.kind === 'input' ? ( @@ -408,7 +391,9 @@ export default function CliCommandBlock({ {showHint ? ( Copy all commands and paste into your terminal to get started ) : ( - Copy the script above and paste into Terminal to get started + + Copy the script above and paste into Terminal to get started + )}

)} diff --git a/docs/src/constants/quickStartCommands.ts b/docs/src/constants/quickStartCommands.ts index 13d9d1e3..b9ea7bab 100644 --- a/docs/src/constants/quickStartCommands.ts +++ b/docs/src/constants/quickStartCommands.ts @@ -1,10 +1,7 @@ -import { - buildInstallCommand, - FALLBACK_REACTPRESS_VERSIONS, -} from '@site/src/npm/packageVersions'; +import { buildInstallCommand, FALLBACK_REACTPRESS_VERSIONS } from '@site/src/npm/packageVersions'; /** ReactPress quick-start commands (homepage CLI demo). */ -export const QUICK_START_INSTALL_COMMAND = buildInstallCommand('beta'); +export const QUICK_START_INSTALL_COMMAND = buildInstallCommand('latest'); export const QUICK_START_COMMANDS = [ QUICK_START_INSTALL_COMMAND, @@ -38,11 +35,11 @@ const QUICK_START_DEV_READY_LINES_ZH: DevReadyLines = [ 'API http://localhost:3002/api', ]; -/** @deprecated Use getQuickStartDemoOutputs(locale, installCommand, betaVersion) */ +/** @deprecated Use getQuickStartDemoOutputs(locale, installCommand, version) */ export const QUICK_START_DEMO_OUTPUTS = getQuickStartDemoOutputs( 'en', QUICK_START_INSTALL_COMMAND, - FALLBACK_REACTPRESS_VERSIONS.beta, + FALLBACK_REACTPRESS_VERSIONS.latest ); /** @deprecated Use getQuickStartDevReadyLines(locale) */ @@ -56,11 +53,7 @@ export function getInstallDemoOutput(_betaVersion: string): readonly string[] { return ['added 1 package in 12s']; } -export function getQuickStartDemoOutputs( - locale: string, - installCommand: string, - betaVersion: string, -): DemoOutputs { +export function getQuickStartDemoOutputs(locale: string, installCommand: string, betaVersion: string): DemoOutputs { const installDemoOutput = getInstallDemoOutput(betaVersion); const shared: DemoOutputs = { [installCommand]: installDemoOutput, diff --git a/docs/src/npm/packageVersions.ts b/docs/src/npm/packageVersions.ts index 390fff60..59db4648 100644 --- a/docs/src/npm/packageVersions.ts +++ b/docs/src/npm/packageVersions.ts @@ -1,24 +1,22 @@ export const REACTPRESS_NPM_PACKAGE = '@fecommunity/reactpress'; -export const REACTPRESS_NPM_REGISTRY_URL = - 'https://registry.npmjs.org/@fecommunity%2Freactpress'; +export const REACTPRESS_NPM_REGISTRY_URL = 'https://registry.npmjs.org/@fecommunity%2Freactpress'; -export const REACTPRESS_NPM_PAGE_URL = - 'https://www.npmjs.com/package/@fecommunity/reactpress'; +export const REACTPRESS_NPM_PAGE_URL = 'https://www.npmjs.com/package/@fecommunity/reactpress'; -/** npm.com version page, e.g. …/v/4.0.0-beta.18 */ +/** npm.com version page, e.g. …/v/4.0.0 */ export function buildNpmVersionPageUrl(version: string): string { return `${REACTPRESS_NPM_PAGE_URL}/v/${encodeURIComponent(version)}`; } -/** GitHub release tag page, e.g. …/releases/tag/v4.0.0-beta.18 */ +/** GitHub release tag page, e.g. …/releases/tag/v4.0.0 */ export function buildGitHubReleaseTagUrl(version: string): string { return `https://github.com/fecommunity/reactpress/releases/tag/v${encodeURIComponent(version)}`; } /** Fallback when the registry is unreachable (SSR / offline). */ export const FALLBACK_REACTPRESS_VERSIONS = { - latest: '3.7.0', + latest: '4.0.0', beta: '4.0.0-beta.18', } as const; @@ -46,7 +44,7 @@ export async function fetchReactPressVersions(): Promise { }; } -export function buildInstallCommand(tag: 'beta' | 'latest' = 'beta'): string { +export function buildInstallCommand(tag: 'beta' | 'latest' = 'latest'): string { return `npm i -g ${REACTPRESS_NPM_PACKAGE}@${tag}`; } diff --git a/docs/src/pages/about.md b/docs/src/pages/about.md index 34565da9..e1fa6a0a 100644 --- a/docs/src/pages/about.md +++ b/docs/src/pages/about.md @@ -22,7 +22,7 @@ keywords: [reactpress, about, open source, react cms, publishing platform] ReactPress 4.0 (codename **Extend**) is the current recommended release. New users install with: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` ## Who ReactPress is for diff --git a/docs/src/seo/structuredData.ts b/docs/src/seo/structuredData.ts index a39595ed..40ad6511 100644 --- a/docs/src/seo/structuredData.ts +++ b/docs/src/seo/structuredData.ts @@ -27,12 +27,11 @@ export const FAQ_ENTRIES_EN: FaqEntry[] = [ { question: 'Is ReactPress 4.0 production-ready?', answer: - '4.0 is in active beta. Core paths init and doctor are stable; validate on staging before upgrading production and read the 3.x to 4.0 migration guide.', + '4.0.0 is the current stable release. When upgrading from 3.x, validate on staging and read the 3.x to 4.0 migration guide.', }, { question: 'Is ReactPress free?', - answer: - 'Yes. ReactPress is open source under the MIT license. Install via npm: npm i -g @fecommunity/reactpress@beta.', + answer: 'Yes. ReactPress is open source under the MIT license. Install via npm: npm i -g @fecommunity/reactpress.', }, ]; @@ -64,7 +63,7 @@ export const FAQ_ENTRIES_ZH: FaqEntry[] = [ }, { question: 'ReactPress 免费吗?', - answer: '是的。ReactPress 基于 MIT 开源,可通过 npm i -g @fecommunity/reactpress@beta 安装。', + answer: '是的。ReactPress 基于 MIT 开源,可通过 npm i -g @fecommunity/reactpress 安装。', }, ]; diff --git a/docs/tutorial/getting-started/build-nextjs-blog-in-60-seconds.md b/docs/tutorial/getting-started/build-nextjs-blog-in-60-seconds.md index 68883318..a7070b35 100644 --- a/docs/tutorial/getting-started/build-nextjs-blog-in-60-seconds.md +++ b/docs/tutorial/getting-started/build-nextjs-blog-in-60-seconds.md @@ -31,7 +31,7 @@ keywords: [next.js 博客, 用 next.js 建博客, next.js cms, reactpress, react ## 第 1 步 — 安装 CLI(约 15 秒) ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress ``` 包地址:[@fecommunity/reactpress](https://www.npmjs.com/package/@fecommunity/reactpress)。 diff --git a/docs/tutorial/getting-started/first-site.md b/docs/tutorial/getting-started/first-site.md index b7aacaa9..781efea9 100644 --- a/docs/tutorial/getting-started/first-site.md +++ b/docs/tutorial/getting-started/first-site.md @@ -12,7 +12,7 @@ keywords: [reactpress, quick start, 快速开始, 第一篇博客, init, tutoria ## 第 1 步:安装 CLI ```bash -npm install -g @fecommunity/reactpress@beta +npm install -g @fecommunity/reactpress ``` ## 第 2 步:初始化站点 diff --git a/docs/tutorial/getting-started/installation.md b/docs/tutorial/getting-started/installation.md index 3b8413bf..f32f6d6c 100644 --- a/docs/tutorial/getting-started/installation.md +++ b/docs/tutorial/getting-started/installation.md @@ -30,10 +30,10 @@ node -v # 应显示 v20.x 或更高 ## 安装 CLI(推荐) ```bash -npm install -g @fecommunity/reactpress@beta +npm install -g @fecommunity/reactpress ``` -> npm **`@beta`** 标签为 4.x 预发布;`@latest` 仍为 3.x。不存在 `@4` dist-tag。 +> 4.0 稳定版在 npm **`@latest`**。预发布使用 `@beta`。不存在 `@4` dist-tag。 首次 `npm install -g` 会触发 `postinstall`,下载 bundled server 运行时依赖,约需 1–2 分钟。 diff --git a/docs/tutorial/getting-started/reactpress-vs-wordpress.md b/docs/tutorial/getting-started/reactpress-vs-wordpress.md index 6100dca2..c59eff85 100644 --- a/docs/tutorial/getting-started/reactpress-vs-wordpress.md +++ b/docs/tutorial/getting-started/reactpress-vs-wordpress.md @@ -20,7 +20,7 @@ keywords: | ------------ | ------------------------------------------------------------------------------- | -------------------------------------------- | | **定位** | **面向 React 开发者的完整发布系统**(Admin + API + Next.js 主题 + 插件 + 桌面) | 全球最流行的 PHP CMS,插件与主题生态极其成熟 | | **技术栈** | React、Next.js、NestJS、SQLite / MySQL | PHP、MySQL、传统主题 | -| **上手** | `npm i -g @fecommunity/reactpress@beta` → `reactpress init` — 约 **60 秒** | 托管一键安装或 LAMP,通常分钟级 | +| **上手** | `npm i -g @fecommunity/reactpress` → `reactpress init` — 约 **60 秒** | 托管一键安装或 LAMP,通常分钟级 | | **编辑** | Markdown 优先的 Admin;熟悉的文章/页面/媒体模型 | Gutenberg 块编辑;编辑器生态庞大 | | **访客交付** | 默认 Next.js SSR / ISR | PHP 主题;常依赖缓存插件 | | **Headless** | 一等公民 REST + TypeScript toolkit | 有 REST;Headless 常需额外配置 | @@ -143,7 +143,7 @@ ReactPress SEO 工作流:[站点设置与 SEO](../user-guide/site-settings-seo ## 快速试用 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -164,7 +164,7 @@ reactpress init 是 — MIT,npm 安装即可。 **4.0 能上生产吗?** -active beta,核心路径稳定。请阅读 [3.x → 4.0 迁移](../tutorial-extras/migration-3-to-4.md) 并在预发验证。 +4.0.0 稳定版。从 3.x 升级请阅读 [3.x → 4.0 迁移](../tutorial-extras/migration-3-to-4.md) 并在预发验证。 **能用自己的前端吗?** 可以 — Headless REST + API Key。 diff --git a/docs/tutorial/getting-started/self-hosted-cms-for-react.md b/docs/tutorial/getting-started/self-hosted-cms-for-react.md index 2c6e8e29..a8b07d36 100644 --- a/docs/tutorial/getting-started/self-hosted-cms-for-react.md +++ b/docs/tutorial/getting-started/self-hosted-cms-for-react.md @@ -14,7 +14,7 @@ keywords: [自托管 cms, 自托管 react cms, react cms, 开源 cms, next.js cm **ReactPress** 是面向 React 开发者的开源 **自托管发布平台**:Admin + NestJS API + Next.js 主题 + 插件 + 可选桌面客户端,一条 CLI 启动。内容与媒体留在 **你自己的** 机器或服务器上。 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-cms && cd my-cms reactpress init ``` @@ -129,7 +129,7 @@ flowchart TB 可以 — 经 API 导出、迁移数据库文件,或让新主题指向同一 API。 **4.0 适合自托管生产吗?** -核心 `init` / `doctor` 在 active beta 中已较稳定;请先预发,并阅读 [3.x → 4.0 迁移](../tutorial-extras/migration-3-to-4.md)。更多见 [FAQ](../reference/faq.md)。 +4.0.0 为稳定版;从 3.x 升级请先预发,并阅读 [3.x → 4.0 迁移](../tutorial-extras/migration-3-to-4.md)。更多见 [FAQ](../reference/faq.md)。 ## 博客延伸阅读 diff --git a/docs/tutorial/getting-started/what-is-reactpress.md b/docs/tutorial/getting-started/what-is-reactpress.md index 580b8298..035e8c9d 100644 --- a/docs/tutorial/getting-started/what-is-reactpress.md +++ b/docs/tutorial/getting-started/what-is-reactpress.md @@ -23,7 +23,7 @@ keywords: [reactpress 是什么, reactpress, react cms, react 发布平台, next | **CLI** | `init` · `doctor` · `logs` · `stop` — 约 **60 秒**上线 | ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-site && cd my-site reactpress init ``` @@ -96,13 +96,13 @@ flowchart LR ## 快速问答 -| 问题 | 答案 | -| ------------------ | -------------------------------------------------------------------------- | -| 免费吗? | 是 — MIT 开源 | -| 需要 Docker 吗? | 默认不需要(SQLite);仅 embedded-docker / 外部 MySQL 时需要 | -| 能上生产吗? | 4.0 为 active beta;请在预发验证 — 见 [FAQ](../reference/faq.md) | -| 能用自己的前端吗? | 可以 — Headless REST + API Key | -| 和 WordPress? | 编辑理念相近,交付用 React/Next — [完整对比](./reactpress-vs-wordpress.md) | +| 问题 | 答案 | +| ------------------ | -------------------------------------------------------------------------------- | +| 免费吗? | 是 — MIT 开源 | +| 需要 Docker 吗? | 默认不需要(SQLite);仅 embedded-docker / 外部 MySQL 时需要 | +| 能上生产吗? | 4.0.0 为稳定版(`@latest`);从 3.x 升级请先预发 — 见 [FAQ](../reference/faq.md) | +| 能用自己的前端吗? | 可以 — Headless REST + API Key | +| 和 WordPress? | 编辑理念相近,交付用 React/Next — [完整对比](./reactpress-vs-wordpress.md) | ## 从这里开始 diff --git a/docs/tutorial/intro.md b/docs/tutorial/intro.md index 14274816..3154545e 100644 --- a/docs/tutorial/intro.md +++ b/docs/tutorial/intro.md @@ -24,7 +24,7 @@ keywords: **ReactPress** 是 **面向 React 开发者的发布系统** — 用 React 构建博客、文档、企业官网与内容驱动型应用。一条 CLI 即可运行 CMS API、Web 管理后台、可替换的 Next.js 主题、插件扩展与 Electron 桌面客户端。 -**ReactPress 4.0**(代号 **Extend**)在 3.x 之上新增**插件系统**、**桌面客户端**与 **npm 主题 catalog**。新用户推荐 `npm i -g @fecommunity/reactpress@beta`,详见 [ReactPress 4.0 扩展版](./tutorial-extras/reactpress-4-0.md)。桌面端安装见 [桌面客户端](./tutorial-extras/desktop-client.md)。仍使用 3.x 见 [3.0 平台版](./tutorial-extras/reactpress-3-0.md)。 +**ReactPress 4.0**(代号 **Extend**)在 3.x 之上新增**插件系统**、**桌面客户端**与 **npm 主题 catalog**。新用户推荐 `npm i -g @fecommunity/reactpress`,详见 [ReactPress 4.0 扩展版](./tutorial-extras/reactpress-4-0.md)。桌面端安装见 [桌面客户端](./tutorial-extras/desktop-client.md)。仍使用 3.x 见 [3.0 平台版](./tutorial-extras/reactpress-3-0.md)。 ## 🆚 框架对比 @@ -75,7 +75,7 @@ keywords: ### 终端用户 — 一个全局包 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` @@ -160,7 +160,7 @@ Email: admin@gaoredu.com
ReactPress 免费吗? -是,MIT 开源。安装:`npm i -g @fecommunity/reactpress@beta`。 +是,MIT 开源。安装:`npm i -g @fecommunity/reactpress`。
diff --git a/docs/tutorial/reference/faq.md b/docs/tutorial/reference/faq.md index 5f95fe42..e0ef8801 100644 --- a/docs/tutorial/reference/faq.md +++ b/docs/tutorial/reference/faq.md @@ -90,7 +90,7 @@ Monorepo 本地开发时,Admin Vite dev server 可能在 `http://localhost:300
ReactPress 免费吗? -是,MIT 开源。全局安装:`npm i -g @fecommunity/reactpress@beta`。 +是,MIT 开源。全局安装:`npm i -g @fecommunity/reactpress`。
@@ -99,7 +99,7 @@ Monorepo 本地开发时,Admin Vite dev server 可能在 `http://localhost:300
4.0 可以上生产吗? -4.0 处于 active beta。建议在升级生产前阅读 [3.x → 4.0 迁移](../tutorial-extras/migration-3-to-4.md) 并在 staging 验证。核心路径 `init` / `doctor` 已稳定可用。 +4.0.0 为当前稳定版(npm `@latest`)。从 3.x 升级请阅读 [3.x → 4.0 迁移](../tutorial-extras/migration-3-to-4.md),并先在预发验证。
diff --git a/docs/tutorial/reference/troubleshooting.md b/docs/tutorial/reference/troubleshooting.md index 1a5f4ea9..e077e18f 100644 --- a/docs/tutorial/reference/troubleshooting.md +++ b/docs/tutorial/reference/troubleshooting.md @@ -16,13 +16,13 @@ reactpress logs --tail 100 ## 诊断命令速查 -| 命令 | 用途 | -|------|------| -| `reactpress doctor` | 环境、端口、DB、进程总览 | -| `reactpress doctor --show-logs` | 失败时附带日志片段 | -| `reactpress logs -f` | 实时跟踪 API 日志 | -| `reactpress logs --grep error` | 过滤错误行 | -| `reactpress stop` | 停止后干净重启 | +| 命令 | 用途 | +| ------------------------------- | ------------------------ | +| `reactpress doctor` | 环境、端口、DB、进程总览 | +| `reactpress doctor --show-logs` | 失败时附带日志片段 | +| `reactpress logs -f` | 实时跟踪 API 日志 | +| `reactpress logs --grep error` | 过滤错误行 | +| `reactpress stop` | 停止后干净重启 | Monorepo:`pnpm status`、`pnpm docker:dev:logs` @@ -34,7 +34,7 @@ Monorepo:`pnpm status`、`pnpm docker:dev:logs` ```bash # 重试安装 -npm install -g @fecommunity/reactpress@beta --force +npm install -g @fecommunity/reactpress --force # 检查代理与 registry npm config get registry @@ -71,11 +71,11 @@ reactpress init ### API 启动但 Admin / 主题无法访问 -| 现象 | 可能原因 | 处理 | -|------|----------|------| -| :3000 无法打开 | web 进程未起 | Monorepo:`pnpm dev:web`;检查 logs | -| :3001 空白 | 主题未启用 | Admin → 外观 → 启用主题 | -| CORS 错误 | URL 配置不一致 | 核对 `CLIENT_SITE_URL` / `SERVER_SITE_URL` | +| 现象 | 可能原因 | 处理 | +| -------------- | -------------- | ------------------------------------------ | +| :3000 无法打开 | web 进程未起 | Monorepo:`pnpm dev:web`;检查 logs | +| :3001 空白 | 主题未启用 | Admin → 外观 → 启用主题 | +| CORS 错误 | URL 配置不一致 | 核对 `CLIENT_SITE_URL` / `SERVER_SITE_URL` | ### 主题进程报错 REACTPRESS_THEME_NOT_FOUND diff --git a/docs/tutorial/tutorial-basics/deploy-your-site.md b/docs/tutorial/tutorial-basics/deploy-your-site.md index 55e0f2a8..d8a8dfe9 100644 --- a/docs/tutorial/tutorial-basics/deploy-your-site.md +++ b/docs/tutorial/tutorial-basics/deploy-your-site.md @@ -10,7 +10,7 @@ keywords: [reactpress, production, deploy, nginx, start, build] 已在服务器安装 Node ≥ 18 与 Docker(或外部 MySQL)时: ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress cd /path/to/your-site # 含 .reactpress/ 的项目目录 reactpress init # 若尚未初始化 reactpress build # 按需构建 @@ -76,11 +76,11 @@ pm2 restart all # 或 pnpm run pm2 4.0 全局 CLI 默认使用**内置 API + 主题内嵌 Admin**(`reactpress init`)。以下拆分部署能力主要面向 **Monorepo 贡献者**或仍使用 3.x CLI 的站点: -| 场景 | 说明 | -|------|------| -| 全栈(终端用户) | `reactpress init` | +| 场景 | 说明 | +| ----------------- | ---------------------------------------------------------------------------------------- | +| 全栈(终端用户) | `reactpress init` | | 仅 API / 拆分进程 | Monorepo:`pnpm dev:api` 等,见 [Monorepo 开发](../developer-guide/local-development.md) | -| 桌面客户端 | `pnpm build:desktop`(本地 SQLite,非服务器部署) | +| 桌面客户端 | `pnpm build:desktop`(本地 SQLite,非服务器部署) | `@fecommunity/reactpress-server` 已 deprecated,请勿作为新项目的生产入口。 diff --git a/docs/tutorial/tutorial-basics/start.md b/docs/tutorial/tutorial-basics/start.md index 3da9cdf1..ae7ef6af 100644 --- a/docs/tutorial/tutorial-basics/start.md +++ b/docs/tutorial/tutorial-basics/start.md @@ -9,28 +9,28 @@ keywords: [reactpress, local development, dev, pnpm, monorepo] ReactPress 4.0 提供三条本地路径,按场景选择。 -| 场景 | 方式 | 前置 | -|------|------|------| -| **建站 / 试用(推荐)** | 全局 `reactpress init` | Node ≥ 20 | -| **离线写作** | 桌面客户端 | 见 [桌面客户端](../tutorial-extras/desktop-client.md) | -| **贡献 monorepo** | `pnpm dev` | Node ≥ 20、pnpm | +| 场景 | 方式 | 前置 | +| ----------------------- | ---------------------- | ----------------------------------------------------- | +| **建站 / 试用(推荐)** | 全局 `reactpress init` | Node ≥ 20 | +| **离线写作** | 桌面客户端 | 见 [桌面客户端](../tutorial-extras/desktop-client.md) | +| **贡献 monorepo** | `pnpm dev` | Node ≥ 20、pnpm | ## 方式一:全局 CLI(推荐) ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` `init` 生成配置、初始化 SQLite 并**自动启动**全栈。 -| 服务 | 端口 | 地址 | -|------|------|------| -| 管理后台 | 3001 `/admin/` | http://localhost:3001/admin/ | -| 访客主题 | 3001 | http://localhost:3001 | -| API | 3002 | http://localhost:3002/api/health | -| 主题预览 | 3003 | http://localhost:3003 | +| 服务 | 端口 | 地址 | +| -------- | -------------- | -------------------------------- | +| 管理后台 | 3001 `/admin/` | http://localhost:3001/admin/ | +| 访客主题 | 3001 | http://localhost:3001 | +| API | 3002 | http://localhost:3002/api/health | +| 主题预览 | 3003 | http://localhost:3003 | ### 常用命令 diff --git a/docs/tutorial/tutorial-extras/migration-3-to-4.md b/docs/tutorial/tutorial-extras/migration-3-to-4.md index 5612e990..0ac3c47e 100644 --- a/docs/tutorial/tutorial-extras/migration-3-to-4.md +++ b/docs/tutorial/tutorial-extras/migration-3-to-4.md @@ -14,7 +14,7 @@ ReactPress **4.0** 在 3.x 之上新增插件系统、Electron 桌面客户端 ## 升级步骤 ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress cd your-site reactpress doctor ``` diff --git a/docs/tutorial/tutorial-extras/reactpress-4-0.md b/docs/tutorial/tutorial-extras/reactpress-4-0.md index 2813c1be..a9c28d2e 100644 --- a/docs/tutorial/tutorial-extras/reactpress-4-0.md +++ b/docs/tutorial/tutorial-extras/reactpress-4-0.md @@ -20,7 +20,7 @@ keywords: [reactpress 4.0, extend, plugin, desktop, theme catalog, wordpress alt ## 快速开始(全栈,与 3.x 相同) ```bash -npm i -g @fecommunity/reactpress@beta +npm i -g @fecommunity/reactpress mkdir my-blog && cd my-blog reactpress init ``` diff --git a/package.json b/package.json index c5ba60e8..2ce98d27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reactpress", - "version": "4.0.0-beta.18", + "version": "4.0.0", "private": true, "packageManager": "pnpm@9.15.9", "description": "ReactPress — Publish with React. Ship like WordPress. CMS, Admin, Headless API, Next.js themes, plugins, desktop — one CLI.", diff --git a/server/package.json b/server/package.json index 31013dec..5f508c51 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "@fecommunity/reactpress-server", - "version": "4.0.0-beta.18", + "version": "4.0.0", "deprecated": "Bundled in @fecommunity/reactpress CLI from v3.1. Run `npx @fecommunity/reactpress init` for new projects.", "description": "ReactPress NestJS REST API (deprecated). Bundled in @fecommunity/reactpress CLI from v3.1. Headless CMS for articles, media, plugins, and themes", "author": "fecommunity", diff --git a/toolkit/package.json b/toolkit/package.json index b8b3f446..890fd723 100644 --- a/toolkit/package.json +++ b/toolkit/package.json @@ -1,6 +1,6 @@ { "name": "@fecommunity/reactpress-toolkit", - "version": "4.0.0-beta.18", + "version": "4.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { diff --git a/web/package.json b/web/package.json index c73e646b..0869815c 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "@fecommunity/reactpress-web", - "version": "4.0.0-beta.20", + "version": "4.0.0", "description": "Official ReactPress Admin — WordPress-style writing UI for the publishing platform. Vite SPA with Express and Next.js /admin/ mount helpers", "keywords": [ "admin", diff --git a/web/src/routes/login/-LoginCliSnippet.tsx b/web/src/routes/login/-LoginCliSnippet.tsx index 0e4323f6..74bbae7a 100644 --- a/web/src/routes/login/-LoginCliSnippet.tsx +++ b/web/src/routes/login/-LoginCliSnippet.tsx @@ -15,7 +15,7 @@ import { import styles from "./login-cli-snippet.module.css"; const QUICK_START_LINES = [ - "npm i -g @fecommunity/reactpress@beta", + "npm i -g @fecommunity/reactpress", "mkdir my-site && cd my-site", "reactpress init", ] as const; diff --git a/web/src/routes/login/-loginCyberLogo.ts b/web/src/routes/login/-loginCyberLogo.ts index 38d2b416..4569d676 100644 --- a/web/src/routes/login/-loginCyberLogo.ts +++ b/web/src/routes/login/-loginCyberLogo.ts @@ -19,4 +19,4 @@ export const LOGIN_CYBER_LOGO_GRADIENTS = [ export const LOGIN_CYBER_COMMANDS = ["init", "doctor", "logs", "stop", "deploy"] as const; -export const REACTPRESS_CLI_VERSION = "4.0.0-beta.0"; +export const REACTPRESS_CLI_VERSION = "4.0.0";