@fecommunity/reactpress 3.7.0 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/reactpress-cli-shim.js +2 -6
- package/bin/reactpress-theme-client.js +2 -0
- package/bin/reactpress.js +1 -380
- package/out/.source-fingerprint-cli +1 -0
- package/out/bin/reactpress-cli-shim.d.ts +3 -0
- package/out/bin/reactpress-cli-shim.d.ts.map +1 -0
- package/out/bin/reactpress-cli-shim.js +28 -0
- package/out/bin/reactpress-cli-shim.js.map +1 -0
- package/out/bin/reactpress-theme-client.d.ts +3 -0
- package/out/bin/reactpress-theme-client.d.ts.map +1 -0
- package/out/bin/reactpress-theme-client.js +113 -0
- package/out/bin/reactpress-theme-client.js.map +1 -0
- package/out/bin/reactpress.d.ts +3 -0
- package/out/bin/reactpress.d.ts.map +1 -0
- package/out/bin/reactpress.js +566 -0
- package/out/bin/reactpress.js.map +1 -0
- package/out/core/services/config.d.ts +12 -0
- package/out/core/services/config.d.ts.map +1 -0
- package/out/core/services/config.js +137 -0
- package/out/core/services/config.js.map +1 -0
- package/out/core/services/database/index.d.ts +17 -0
- package/out/core/services/database/index.d.ts.map +1 -0
- package/out/core/services/database/index.js +242 -0
- package/out/core/services/database/index.js.map +1 -0
- package/out/core/services/database/mysql.d.ts +14 -0
- package/out/core/services/database/mysql.d.ts.map +1 -0
- package/out/core/services/database/mysql.js +82 -0
- package/out/core/services/database/mysql.js.map +1 -0
- package/out/core/services/database/profile.d.ts +6 -0
- package/out/core/services/database/profile.d.ts.map +1 -0
- package/out/core/services/database/profile.js +60 -0
- package/out/core/services/database/profile.js.map +1 -0
- package/out/core/services/database/sqlite.d.ts +10 -0
- package/out/core/services/database/sqlite.d.ts.map +1 -0
- package/out/core/services/database/sqlite.js +73 -0
- package/out/core/services/database/sqlite.js.map +1 -0
- package/out/core/services/exec.d.ts +21 -0
- package/out/core/services/exec.d.ts.map +1 -0
- package/out/core/services/exec.js +56 -0
- package/out/core/services/exec.js.map +1 -0
- package/out/core/services/init.d.ts +11 -0
- package/out/core/services/init.d.ts.map +1 -0
- package/out/core/services/init.js +60 -0
- package/out/core/services/init.js.map +1 -0
- package/out/core/services/local-site.d.ts +24 -0
- package/out/core/services/local-site.d.ts.map +1 -0
- package/out/core/services/local-site.js +144 -0
- package/out/core/services/local-site.js.map +1 -0
- package/out/core/utils/cli-context.d.ts +3 -0
- package/out/core/utils/cli-context.d.ts.map +1 -0
- package/out/core/utils/cli-context.js +12 -0
- package/out/core/utils/cli-context.js.map +1 -0
- package/out/core/utils/paths.d.ts +20 -0
- package/out/core/utils/paths.d.ts.map +1 -0
- package/out/core/utils/paths.js +34 -0
- package/out/core/utils/paths.js.map +1 -0
- package/out/core/utils/platform.d.ts +7 -0
- package/out/core/utils/platform.d.ts.map +1 -0
- package/out/core/utils/platform.js +28 -0
- package/out/core/utils/platform.js.map +1 -0
- package/out/core/utils/port.d.ts +4 -0
- package/out/core/utils/port.d.ts.map +1 -0
- package/out/core/utils/port.js +32 -0
- package/out/core/utils/port.js.map +1 -0
- package/out/lib/api-dev-runner.d.ts +3 -0
- package/out/lib/api-dev-runner.d.ts.map +1 -0
- package/{lib → out/lib}/api-dev-runner.js +4 -1
- package/out/lib/api-dev-runner.js.map +1 -0
- package/out/lib/api-dev.d.ts +2 -0
- package/out/lib/api-dev.d.ts.map +1 -0
- package/out/lib/api-dev.js +101 -0
- package/out/lib/api-dev.js.map +1 -0
- package/out/lib/bootstrap.d.ts +18 -0
- package/out/lib/bootstrap.d.ts.map +1 -0
- package/out/lib/bootstrap.js +93 -0
- package/out/lib/bootstrap.js.map +1 -0
- package/out/lib/build.d.ts +2 -0
- package/out/lib/build.d.ts.map +1 -0
- package/out/lib/build.js +191 -0
- package/out/lib/build.js.map +1 -0
- package/out/lib/db-backup.d.ts +2 -0
- package/out/lib/db-backup.d.ts.map +1 -0
- package/out/lib/db-backup.js +68 -0
- package/out/lib/db-backup.js.map +1 -0
- package/out/lib/dev-banner.d.ts +2 -0
- package/out/lib/dev-banner.d.ts.map +1 -0
- package/out/lib/dev-banner.js +102 -0
- package/out/lib/dev-banner.js.map +1 -0
- package/out/lib/dev-child-io.d.ts +2 -0
- package/out/lib/dev-child-io.d.ts.map +1 -0
- package/out/lib/dev-child-io.js +80 -0
- package/out/lib/dev-child-io.js.map +1 -0
- package/out/lib/dev-log.d.ts +2 -0
- package/out/lib/dev-log.d.ts.map +1 -0
- package/out/lib/dev-log.js +64 -0
- package/out/lib/dev-log.js.map +1 -0
- package/out/lib/dev-session.d.ts +2 -0
- package/out/lib/dev-session.d.ts.map +1 -0
- package/out/lib/dev-session.js +95 -0
- package/out/lib/dev-session.js.map +1 -0
- package/out/lib/dev.d.ts +2 -0
- package/out/lib/dev.d.ts.map +1 -0
- package/out/lib/dev.js +914 -0
- package/out/lib/dev.js.map +1 -0
- package/out/lib/docker.d.ts +2 -0
- package/out/lib/docker.d.ts.map +1 -0
- package/out/lib/docker.js +398 -0
- package/out/lib/docker.js.map +1 -0
- package/out/lib/doctor.d.ts +2 -0
- package/out/lib/doctor.d.ts.map +1 -0
- package/out/lib/doctor.js +260 -0
- package/out/lib/doctor.js.map +1 -0
- package/out/lib/health-parse.d.ts +5 -0
- package/out/lib/health-parse.d.ts.map +1 -0
- package/out/lib/health-parse.js +36 -0
- package/out/lib/health-parse.js.map +1 -0
- package/out/lib/health-parse.test.d.ts +2 -0
- package/out/lib/health-parse.test.d.ts.map +1 -0
- package/out/lib/health-parse.test.js +19 -0
- package/out/lib/health-parse.test.js.map +1 -0
- package/out/lib/http.d.ts +2 -0
- package/out/lib/http.d.ts.map +1 -0
- package/out/lib/http.js +234 -0
- package/out/lib/http.js.map +1 -0
- package/out/lib/i18n/index.d.ts +2 -0
- package/out/lib/i18n/index.d.ts.map +1 -0
- package/out/lib/i18n/index.js +29 -0
- package/out/lib/i18n/index.js.map +1 -0
- package/out/lib/i18n/strings.d.ts +2 -0
- package/out/lib/i18n/strings.d.ts.map +1 -0
- package/out/lib/i18n/strings.js +1192 -0
- package/out/lib/i18n/strings.js.map +1 -0
- package/out/lib/lifecycle.d.ts +2 -0
- package/out/lib/lifecycle.d.ts.map +1 -0
- package/out/lib/lifecycle.js +169 -0
- package/out/lib/lifecycle.js.map +1 -0
- package/out/lib/nginx.d.ts +2 -0
- package/out/lib/nginx.d.ts.map +1 -0
- package/out/lib/nginx.js +618 -0
- package/out/lib/nginx.js.map +1 -0
- package/out/lib/paths.d.ts +2 -0
- package/out/lib/paths.d.ts.map +1 -0
- package/out/lib/paths.js +106 -0
- package/out/lib/paths.js.map +1 -0
- package/out/lib/plugin-build.d.ts +2 -0
- package/out/lib/plugin-build.d.ts.map +1 -0
- package/out/lib/plugin-build.js +104 -0
- package/out/lib/plugin-build.js.map +1 -0
- package/out/lib/plugin-cli.d.ts +2 -0
- package/out/lib/plugin-cli.d.ts.map +1 -0
- package/out/lib/plugin-cli.js +142 -0
- package/out/lib/plugin-cli.js.map +1 -0
- package/out/lib/pm2.d.ts +2 -0
- package/out/lib/pm2.d.ts.map +1 -0
- package/out/lib/pm2.js +32 -0
- package/out/lib/pm2.js.map +1 -0
- package/out/lib/ports.d.ts +2 -0
- package/out/lib/ports.d.ts.map +1 -0
- package/out/lib/ports.js +394 -0
- package/out/lib/ports.js.map +1 -0
- package/out/lib/process.d.ts +2 -0
- package/out/lib/process.d.ts.map +1 -0
- package/out/lib/process.js +47 -0
- package/out/lib/process.js.map +1 -0
- package/out/lib/prod-memory.d.ts +6 -0
- package/out/lib/prod-memory.d.ts.map +1 -0
- package/out/lib/prod-memory.js +57 -0
- package/out/lib/prod-memory.js.map +1 -0
- package/out/lib/project-type.d.ts +2 -0
- package/out/lib/project-type.d.ts.map +1 -0
- package/out/lib/project-type.js +95 -0
- package/out/lib/project-type.js.map +1 -0
- package/out/lib/publish.d.ts +3 -0
- package/out/lib/publish.d.ts.map +1 -0
- package/out/lib/publish.js +388 -0
- package/out/lib/publish.js.map +1 -0
- package/out/lib/remote-dev.d.ts +2 -0
- package/out/lib/remote-dev.d.ts.map +1 -0
- package/out/lib/remote-dev.js +158 -0
- package/out/lib/remote-dev.js.map +1 -0
- package/out/lib/root.d.ts +2 -0
- package/out/lib/root.d.ts.map +1 -0
- package/out/lib/root.js +85 -0
- package/out/lib/root.js.map +1 -0
- package/out/lib/spawn.d.ts +2 -0
- package/out/lib/spawn.d.ts.map +1 -0
- package/out/lib/spawn.js +96 -0
- package/out/lib/spawn.js.map +1 -0
- package/out/lib/status.d.ts +2 -0
- package/out/lib/status.d.ts.map +1 -0
- package/out/lib/status.js +78 -0
- package/out/lib/status.js.map +1 -0
- package/out/lib/theme-catalog.d.ts +2 -0
- package/out/lib/theme-catalog.d.ts.map +1 -0
- package/out/lib/theme-catalog.js +6 -0
- package/out/lib/theme-catalog.js.map +1 -0
- package/out/lib/theme-cli.d.ts +2 -0
- package/out/lib/theme-cli.d.ts.map +1 -0
- package/out/lib/theme-cli.js +50 -0
- package/out/lib/theme-cli.js.map +1 -0
- package/out/lib/theme-dev.d.ts +2 -0
- package/out/lib/theme-dev.d.ts.map +1 -0
- package/out/lib/theme-dev.js +759 -0
- package/out/lib/theme-dev.js.map +1 -0
- package/out/lib/theme-env.d.ts +2 -0
- package/out/lib/theme-env.d.ts.map +1 -0
- package/out/lib/theme-env.js +101 -0
- package/out/lib/theme-env.js.map +1 -0
- package/out/lib/theme-install.d.ts +2 -0
- package/out/lib/theme-install.d.ts.map +1 -0
- package/out/lib/theme-install.js +363 -0
- package/out/lib/theme-install.js.map +1 -0
- package/out/lib/theme-lock.d.ts +2 -0
- package/out/lib/theme-lock.d.ts.map +1 -0
- package/out/lib/theme-lock.js +70 -0
- package/out/lib/theme-lock.js.map +1 -0
- package/out/lib/theme-paths.d.ts +2 -0
- package/out/lib/theme-paths.d.ts.map +1 -0
- package/out/lib/theme-paths.js +73 -0
- package/out/lib/theme-paths.js.map +1 -0
- package/out/lib/theme-placeholder-cover.d.ts +13 -0
- package/out/lib/theme-placeholder-cover.d.ts.map +1 -0
- package/out/lib/theme-placeholder-cover.js +95 -0
- package/out/lib/theme-placeholder-cover.js.map +1 -0
- package/out/lib/theme-preview-frame.d.ts +2 -0
- package/out/lib/theme-preview-frame.d.ts.map +1 -0
- package/out/lib/theme-preview-frame.js +107 -0
- package/out/lib/theme-preview-frame.js.map +1 -0
- package/out/lib/theme-preview-pool.d.ts +2 -0
- package/out/lib/theme-preview-pool.d.ts.map +1 -0
- package/out/lib/theme-preview-pool.js +484 -0
- package/out/lib/theme-preview-pool.js.map +1 -0
- package/out/lib/theme-preview-proxy.d.ts +2 -0
- package/out/lib/theme-preview-proxy.d.ts.map +1 -0
- package/out/lib/theme-preview-proxy.js +101 -0
- package/out/lib/theme-preview-proxy.js.map +1 -0
- package/out/lib/theme-prod.d.ts +2 -0
- package/out/lib/theme-prod.d.ts.map +1 -0
- package/out/lib/theme-prod.js +400 -0
- package/out/lib/theme-prod.js.map +1 -0
- package/out/lib/theme-registry.d.ts +2 -0
- package/out/lib/theme-registry.d.ts.map +1 -0
- package/out/lib/theme-registry.js +135 -0
- package/out/lib/theme-registry.js.map +1 -0
- package/out/lib/theme-runtime.d.ts +2 -0
- package/out/lib/theme-runtime.d.ts.map +1 -0
- package/out/lib/theme-runtime.js +344 -0
- package/out/lib/theme-runtime.js.map +1 -0
- package/out/lib/theme-sources.d.ts +2 -0
- package/out/lib/theme-sources.d.ts.map +1 -0
- package/out/lib/theme-sources.js +347 -0
- package/out/lib/theme-sources.js.map +1 -0
- package/out/lib/theme-warmup.d.ts +2 -0
- package/out/lib/theme-warmup.d.ts.map +1 -0
- package/out/lib/theme-warmup.js +167 -0
- package/out/lib/theme-warmup.js.map +1 -0
- package/out/lib/toolkit-build.d.ts +2 -0
- package/out/lib/toolkit-build.d.ts.map +1 -0
- package/out/lib/toolkit-build.js +57 -0
- package/out/lib/toolkit-build.js.map +1 -0
- package/out/types/config.d.ts +57 -0
- package/out/types/config.d.ts.map +1 -0
- package/out/types/config.js +3 -0
- package/out/types/config.js.map +1 -0
- package/out/ui/banner.d.ts +2 -0
- package/out/ui/banner.d.ts.map +1 -0
- package/out/ui/banner.js +358 -0
- package/out/ui/banner.js.map +1 -0
- package/out/ui/interactive.d.ts +2 -0
- package/out/ui/interactive.d.ts.map +1 -0
- package/out/ui/interactive.js +378 -0
- package/out/ui/interactive.js.map +1 -0
- package/out/ui/prompts.d.ts +2 -0
- package/out/ui/prompts.d.ts.map +1 -0
- package/out/ui/prompts.js +91 -0
- package/out/ui/prompts.js.map +1 -0
- package/out/ui/theme.d.ts +2 -0
- package/out/ui/theme.d.ts.map +1 -0
- package/out/ui/theme.js +250 -0
- package/out/ui/theme.js.map +1 -0
- package/package.json +13 -7
- package/server/dist/common/api-messages.d.ts +9 -0
- package/server/dist/common/api-messages.js +9 -0
- package/server/dist/common/api-messages.js.map +1 -1
- package/server/dist/database/typeorm-options.d.ts +3 -0
- package/server/dist/database/typeorm-options.js +60 -0
- package/server/dist/database/typeorm-options.js.map +1 -0
- package/server/dist/modules/api-key/api-key.controller.js.map +1 -1
- package/server/dist/modules/api-key/api-key.entity.js.map +1 -1
- package/server/dist/modules/api-key/api-key.guard.js +2 -3
- package/server/dist/modules/api-key/api-key.guard.js.map +1 -1
- package/server/dist/modules/api-key/api-key.module.js.map +1 -1
- package/server/dist/modules/api-key/api-key.service.js +1 -1
- package/server/dist/modules/api-key/api-key.service.js.map +1 -1
- package/server/dist/modules/article/article-revision.entity.js +3 -3
- package/server/dist/modules/article/article-revision.entity.js.map +1 -1
- package/server/dist/modules/article/article-slug.util.d.ts +2 -0
- package/server/dist/modules/article/article-slug.util.js +19 -0
- package/server/dist/modules/article/article-slug.util.js.map +1 -0
- package/server/dist/modules/article/scheduled-publish.service.js.map +1 -1
- package/server/dist/modules/bootstrap/bootstrap.constants.d.ts +20 -0
- package/server/dist/modules/bootstrap/bootstrap.constants.js +171 -0
- package/server/dist/modules/bootstrap/bootstrap.constants.js.map +1 -0
- package/server/dist/modules/bootstrap/bootstrap.service.d.ts +22 -0
- package/server/dist/modules/bootstrap/bootstrap.service.js +183 -0
- package/server/dist/modules/bootstrap/bootstrap.service.js.map +1 -0
- package/server/dist/modules/bootstrap/install-locale.d.ts +2 -0
- package/server/dist/modules/bootstrap/install-locale.js +11 -0
- package/server/dist/modules/bootstrap/install-locale.js.map +1 -0
- package/server/dist/modules/extension/extension.module.d.ts +9 -0
- package/server/dist/modules/extension/extension.module.js +50 -0
- package/server/dist/modules/extension/extension.module.js.map +1 -0
- package/server/dist/modules/extension/plugin-loader.service.d.ts +12 -0
- package/server/dist/modules/extension/plugin-loader.service.js +96 -0
- package/server/dist/modules/extension/plugin-loader.service.js.map +1 -0
- package/server/dist/modules/extension/plugin-registry.bridge.d.ts +3 -0
- package/server/dist/modules/extension/plugin-registry.bridge.js +44 -0
- package/server/dist/modules/extension/plugin-registry.bridge.js.map +1 -0
- package/server/dist/modules/extension/plugin.controller.d.ts +22 -0
- package/server/dist/modules/extension/plugin.controller.js +155 -0
- package/server/dist/modules/extension/plugin.controller.js.map +1 -0
- package/server/dist/modules/extension/plugin.service.d.ts +52 -0
- package/server/dist/modules/extension/plugin.service.js +391 -0
- package/server/dist/modules/extension/plugin.service.js.map +1 -0
- package/server/dist/modules/extension/preview-draft.store.d.ts +13 -0
- package/server/dist/modules/extension/preview-draft.store.js +41 -0
- package/server/dist/modules/extension/preview-draft.store.js.map +1 -0
- package/server/dist/modules/extension/theme-registry.bridge.d.ts +56 -0
- package/server/dist/modules/extension/theme-registry.bridge.js +46 -0
- package/server/dist/modules/extension/theme-registry.bridge.js.map +1 -0
- package/server/dist/modules/extension/theme.controller.d.ts +66 -0
- package/server/dist/modules/extension/theme.controller.js +301 -0
- package/server/dist/modules/extension/theme.controller.js.map +1 -0
- package/server/dist/modules/extension/theme.service.d.ts +140 -0
- package/server/dist/modules/extension/theme.service.js +1039 -0
- package/server/dist/modules/extension/theme.service.js.map +1 -0
- package/server/dist/modules/file/file-optimization.controller.d.ts +12 -0
- package/server/dist/modules/file/file-optimization.controller.js +79 -0
- package/server/dist/modules/file/file-optimization.controller.js.map +1 -0
- package/server/dist/modules/file/file-optimization.service.d.ts +36 -0
- package/server/dist/modules/file/file-optimization.service.js +385 -0
- package/server/dist/modules/file/file-optimization.service.js.map +1 -0
- package/server/dist/modules/file/file-optimization.types.d.ts +66 -0
- package/server/dist/modules/file/file-optimization.types.js +5 -0
- package/server/dist/modules/file/file-optimization.types.js.map +1 -0
- package/server/dist/modules/file/image-optimizer-plugin.guard.d.ts +7 -0
- package/server/dist/modules/file/image-optimizer-plugin.guard.js +33 -0
- package/server/dist/modules/file/image-optimizer-plugin.guard.js.map +1 -0
- package/server/dist/modules/health/health.controller.js +2 -4
- package/server/dist/modules/health/health.controller.js.map +1 -1
- package/server/dist/modules/health/health.module.js.map +1 -1
- package/server/dist/modules/hook/hook.module.d.ts +2 -0
- package/server/dist/modules/hook/hook.module.js +22 -0
- package/server/dist/modules/hook/hook.module.js.map +1 -0
- package/server/dist/modules/hook/hook.service.d.ts +26 -0
- package/server/dist/modules/hook/hook.service.js +105 -0
- package/server/dist/modules/hook/hook.service.js.map +1 -0
- package/server/dist/modules/webhook/webhook.controller.js.map +1 -1
- package/server/dist/modules/webhook/webhook.entity.js.map +1 -1
- package/server/dist/modules/webhook/webhook.module.js.map +1 -1
- package/server/dist/modules/webhook/webhook.service.d.ts +1 -1
- package/server/dist/modules/webhook/webhook.service.js +5 -2
- package/server/dist/modules/webhook/webhook.service.js.map +1 -1
- package/server/dist/node-polyfills.d.ts +18 -0
- package/server/dist/node-polyfills.js +24 -0
- package/server/dist/node-polyfills.js.map +1 -0
- package/server/dist/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
- package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
- package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
- package/server/dist/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
- package/server/dist/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
- package/server/dist/tsconfig.tsbuildinfo +1 -0
- package/server/dist/utils/image-processor.util.d.ts +23 -0
- package/server/dist/utils/image-processor.util.js +88 -0
- package/server/dist/utils/image-processor.util.js.map +1 -0
- package/server/dist/utils/local-api-quiet.util.d.ts +1 -0
- package/server/dist/utils/local-api-quiet.util.js +8 -0
- package/server/dist/utils/local-api-quiet.util.js.map +1 -0
- package/server/dist/utils/project-root.util.d.ts +2 -0
- package/server/dist/utils/project-root.util.js +42 -0
- package/server/dist/utils/project-root.util.js.map +1 -0
- package/server/public/uploads/2026-05-30/QR3X4UZQ93ZTUPGXCFA9II..png +0 -0
- package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8.webp +0 -0
- package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_medium.webp +0 -0
- package/server/public/uploads/2026-05-31/BXQV3NX9ZVWHGNOSX9AXD8_thumb.webp +0 -0
- package/server/public/uploads/2026-05-31/I2SZC0ONA7CF31UM46MN56..jpg +0 -0
- package/templates/config.local.json +13 -0
- package/templates/env.local.default +10 -0
- package/templates/theme-catalog.json +27 -0
- package/lib/api-dev.js +0 -89
- package/lib/bootstrap.js +0 -114
- package/lib/build.js +0 -162
- package/lib/db-backup.js +0 -67
- package/lib/dev-banner.js +0 -72
- package/lib/dev.js +0 -141
- package/lib/docker.js +0 -275
- package/lib/doctor.js +0 -266
- package/lib/http.js +0 -182
- package/lib/i18n/index.js +0 -32
- package/lib/i18n/strings.js +0 -846
- package/lib/lifecycle.js +0 -190
- package/lib/nginx.js +0 -342
- package/lib/paths.js +0 -108
- package/lib/pm2.js +0 -32
- package/lib/process.js +0 -45
- package/lib/project-type.js +0 -72
- package/lib/publish.js +0 -968
- package/lib/root.js +0 -88
- package/lib/spawn.js +0 -92
- package/lib/status.js +0 -132
- package/ui/banner.js +0 -441
- package/ui/interactive.js +0 -380
- package/ui/theme.js +0 -265
package/lib/root.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const CLI_PACKAGE_NAME = '@fecommunity/reactpress';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Install root: monorepo checkout (repo root) or published @fecommunity/reactpress package root.
|
|
8
|
-
* cli/lib -> ../.. when pnpm-workspace.yaml exists; published lib/ -> .. only.
|
|
9
|
-
*/
|
|
10
|
-
function getMonorepoRoot() {
|
|
11
|
-
const packageRoot = path.resolve(__dirname, '..');
|
|
12
|
-
const parentOfPackage = path.resolve(__dirname, '../..');
|
|
13
|
-
if (fs.existsSync(path.join(parentOfPackage, 'pnpm-workspace.yaml'))) {
|
|
14
|
-
return parentOfPackage;
|
|
15
|
-
}
|
|
16
|
-
return packageRoot;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function isPublishedCliRoot(dir) {
|
|
20
|
-
const resolved = path.resolve(dir);
|
|
21
|
-
try {
|
|
22
|
-
const pkg = JSON.parse(
|
|
23
|
-
fs.readFileSync(path.join(resolved, 'package.json'), 'utf8')
|
|
24
|
-
);
|
|
25
|
-
if (pkg.name !== CLI_PACKAGE_NAME) return false;
|
|
26
|
-
} catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return !fs.existsSync(path.join(resolved, 'pnpm-workspace.yaml'));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function isProjectRoot(dir) {
|
|
33
|
-
const resolved = path.resolve(dir);
|
|
34
|
-
if (isPublishedCliRoot(resolved)) return false;
|
|
35
|
-
return (
|
|
36
|
-
fs.existsSync(path.join(resolved, '.reactpress', 'config.json')) ||
|
|
37
|
-
fs.existsSync(path.join(resolved, 'pnpm-workspace.yaml')) ||
|
|
38
|
-
fs.existsSync(path.join(resolved, 'server', 'src', 'main.ts')) ||
|
|
39
|
-
fs.existsSync(path.join(resolved, 'toolkit', 'package.json'))
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function findProjectRoot(startDir = process.cwd()) {
|
|
44
|
-
let dir = path.resolve(startDir);
|
|
45
|
-
while (true) {
|
|
46
|
-
if (isProjectRoot(dir)) return dir;
|
|
47
|
-
const parent = path.dirname(dir);
|
|
48
|
-
if (parent === dir) break;
|
|
49
|
-
dir = parent;
|
|
50
|
-
}
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function getProjectRoot() {
|
|
55
|
-
const envRoot = process.env.REACTPRESS_ORIGINAL_CWD;
|
|
56
|
-
if (envRoot) {
|
|
57
|
-
const resolved = path.resolve(envRoot);
|
|
58
|
-
if (isProjectRoot(resolved)) return resolved;
|
|
59
|
-
}
|
|
60
|
-
const discovered = findProjectRoot(process.cwd());
|
|
61
|
-
if (discovered) return discovered;
|
|
62
|
-
if (envRoot) return path.resolve(envRoot);
|
|
63
|
-
return path.resolve(process.cwd());
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function ensureOriginalCwd() {
|
|
67
|
-
const root = getProjectRoot();
|
|
68
|
-
process.env.REACTPRESS_ORIGINAL_CWD = root;
|
|
69
|
-
return root;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function isMonorepoCheckout(cwd) {
|
|
73
|
-
const resolved = path.resolve(cwd || process.cwd());
|
|
74
|
-
return (
|
|
75
|
-
fs.existsSync(path.join(resolved, 'pnpm-workspace.yaml')) ||
|
|
76
|
-
fs.existsSync(path.join(resolved, 'server', 'src', 'main.ts'))
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
module.exports = {
|
|
81
|
-
getMonorepoRoot,
|
|
82
|
-
getProjectRoot,
|
|
83
|
-
ensureOriginalCwd,
|
|
84
|
-
isMonorepoCheckout,
|
|
85
|
-
isProjectRoot,
|
|
86
|
-
findProjectRoot,
|
|
87
|
-
isPublishedCliRoot,
|
|
88
|
-
};
|
package/lib/spawn.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
const { spawn, spawnSync } = require('child_process');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const chalk = require('chalk');
|
|
4
|
-
const { ensureOriginalCwd } = require('./root');
|
|
5
|
-
const { getCliPackageRoot } = require('./paths');
|
|
6
|
-
const { t, resolveLocale } = require('./i18n');
|
|
7
|
-
|
|
8
|
-
function runSync(command, args, options = {}) {
|
|
9
|
-
const result = spawnSync(command, args, {
|
|
10
|
-
cwd: options.cwd || ensureOriginalCwd(),
|
|
11
|
-
stdio: 'inherit',
|
|
12
|
-
env: {
|
|
13
|
-
...process.env,
|
|
14
|
-
REACTPRESS_LANG: process.env.REACTPRESS_LANG || resolveLocale(),
|
|
15
|
-
REACTPRESS_ORIGINAL_CWD:
|
|
16
|
-
options.cwd || process.env.REACTPRESS_ORIGINAL_CWD || process.cwd(),
|
|
17
|
-
...options.env,
|
|
18
|
-
},
|
|
19
|
-
shell: options.shell ?? false,
|
|
20
|
-
});
|
|
21
|
-
if (result.status !== 0) {
|
|
22
|
-
const err = new Error(
|
|
23
|
-
t('spawn.commandFailed', { command, code: result.status ?? 1 })
|
|
24
|
-
);
|
|
25
|
-
err.exitCode = result.status ?? 1;
|
|
26
|
-
throw err;
|
|
27
|
-
}
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function runNodeScript(scriptPath, args = [], options = {}) {
|
|
32
|
-
return new Promise((resolve, reject) => {
|
|
33
|
-
const child = spawn(process.execPath, [scriptPath, ...args], {
|
|
34
|
-
stdio: 'inherit',
|
|
35
|
-
cwd: options.cwd || ensureOriginalCwd(),
|
|
36
|
-
env: {
|
|
37
|
-
...process.env,
|
|
38
|
-
REACTPRESS_LANG: process.env.REACTPRESS_LANG || resolveLocale(),
|
|
39
|
-
REACTPRESS_ORIGINAL_CWD:
|
|
40
|
-
options.cwd || process.env.REACTPRESS_ORIGINAL_CWD || process.cwd(),
|
|
41
|
-
...options.env,
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
child.on('error', (error) => {
|
|
46
|
-
console.error(chalk.red('[ReactPress]'), error.message || error);
|
|
47
|
-
reject(error);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
child.on('close', (code) => {
|
|
51
|
-
if (code !== 0) {
|
|
52
|
-
reject(Object.assign(new Error(t('spawn.exitCode', { code })), { exitCode: code }));
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
resolve(code);
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function spawnDetached(scriptPath, args = [], options = {}) {
|
|
61
|
-
const child = spawn(process.execPath, [scriptPath, ...args], {
|
|
62
|
-
stdio: options.stdio ?? 'ignore',
|
|
63
|
-
detached: true,
|
|
64
|
-
cwd: options.cwd,
|
|
65
|
-
env: {
|
|
66
|
-
...process.env,
|
|
67
|
-
REACTPRESS_LANG: process.env.REACTPRESS_LANG || resolveLocale(),
|
|
68
|
-
REACTPRESS_ORIGINAL_CWD:
|
|
69
|
-
options.cwd || process.env.REACTPRESS_ORIGINAL_CWD || process.cwd(),
|
|
70
|
-
...options.env,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
child.unref();
|
|
74
|
-
return child;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function runReactpressCli(args, options = {}) {
|
|
78
|
-
const cliBin = path.join(getCliPackageRoot(), 'dist', 'index.js');
|
|
79
|
-
return runSync(process.execPath, [cliBin, ...args], options);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function resolveCliScript(relativePath) {
|
|
83
|
-
return path.join(__dirname, '..', relativePath);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
module.exports = {
|
|
87
|
-
runSync,
|
|
88
|
-
runNodeScript,
|
|
89
|
-
spawnDetached,
|
|
90
|
-
runReactpressCli,
|
|
91
|
-
resolveCliScript,
|
|
92
|
-
};
|
package/lib/status.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const {
|
|
4
|
-
brand,
|
|
5
|
-
icon,
|
|
6
|
-
divider,
|
|
7
|
-
padRight,
|
|
8
|
-
statusPill,
|
|
9
|
-
sectionHeader,
|
|
10
|
-
terminalWidth,
|
|
11
|
-
gradientText,
|
|
12
|
-
palette,
|
|
13
|
-
} = require('../ui/theme');
|
|
14
|
-
const {
|
|
15
|
-
loadServerSiteUrl,
|
|
16
|
-
loadClientSiteUrl,
|
|
17
|
-
getHealthUrl,
|
|
18
|
-
checkHealth,
|
|
19
|
-
isHttpResponding,
|
|
20
|
-
} = require('./http');
|
|
21
|
-
const { isUsingMonorepoServer } = require('./paths');
|
|
22
|
-
const { readPid, isProcessRunning } = require('./process');
|
|
23
|
-
const { isDockerRunning } = require('./docker');
|
|
24
|
-
const { ensureOriginalCwd } = require('./root');
|
|
25
|
-
const { t } = require('./i18n');
|
|
26
|
-
|
|
27
|
-
function envFileStatus(projectRoot) {
|
|
28
|
-
const envPath = path.join(projectRoot, '.env');
|
|
29
|
-
const configPath = path.join(projectRoot, '.reactpress', 'config.json');
|
|
30
|
-
return {
|
|
31
|
-
env: fs.existsSync(envPath),
|
|
32
|
-
config: fs.existsSync(configPath),
|
|
33
|
-
envPath,
|
|
34
|
-
configPath,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function fieldRow(label, value) {
|
|
39
|
-
return ` ${brand.muted(padRight(label, 10))} ${value}`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
async function printUnifiedStatus(projectRoot = ensureOriginalCwd()) {
|
|
43
|
-
const env = envFileStatus(projectRoot);
|
|
44
|
-
const apiUrl = loadServerSiteUrl(projectRoot);
|
|
45
|
-
const clientUrl = loadClientSiteUrl(projectRoot);
|
|
46
|
-
const pid = readPid(projectRoot);
|
|
47
|
-
const healthUrl = getHealthUrl(projectRoot);
|
|
48
|
-
const [apiHttp, clientHttp, health] = await Promise.all([
|
|
49
|
-
isHttpResponding(apiUrl),
|
|
50
|
-
isHttpResponding(clientUrl),
|
|
51
|
-
checkHealth(healthUrl),
|
|
52
|
-
]);
|
|
53
|
-
|
|
54
|
-
const apiSource = isUsingMonorepoServer(projectRoot)
|
|
55
|
-
? t('status.apiSource.monorepo')
|
|
56
|
-
: t('status.apiSource.bundle');
|
|
57
|
-
|
|
58
|
-
const w = Math.min(terminalWidth() - 4, 52);
|
|
59
|
-
const httpOn = { on: t('status.apiOnline'), off: t('status.apiOffline') };
|
|
60
|
-
|
|
61
|
-
console.log('');
|
|
62
|
-
console.log(` ${gradientText(t('status.title'), [palette.primary, palette.accent], { bold: true })}`);
|
|
63
|
-
console.log(` ${divider(w)}`);
|
|
64
|
-
|
|
65
|
-
console.log(sectionHeader(t('status.section.project')));
|
|
66
|
-
console.log(fieldRow(t('status.field.dir'), brand.dim(projectRoot)));
|
|
67
|
-
console.log(fieldRow(t('status.field.source'), brand.accent(apiSource)));
|
|
68
|
-
console.log(
|
|
69
|
-
fieldRow(
|
|
70
|
-
t('status.field.config'),
|
|
71
|
-
env.config ? brand.success(t('status.configOk')) : brand.warn(t('status.configBad'))
|
|
72
|
-
)
|
|
73
|
-
);
|
|
74
|
-
console.log(
|
|
75
|
-
fieldRow(
|
|
76
|
-
t('status.field.env'),
|
|
77
|
-
env.env ? brand.success(t('status.envOk')) : brand.warn(t('status.envBad'))
|
|
78
|
-
)
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
console.log('');
|
|
82
|
-
console.log(sectionHeader(t('status.section.api')));
|
|
83
|
-
console.log(fieldRow(t('status.field.url'), brand.dim(apiUrl)));
|
|
84
|
-
console.log(fieldRow(t('status.field.http'), statusPill(apiHttp, httpOn)));
|
|
85
|
-
console.log(
|
|
86
|
-
fieldRow(
|
|
87
|
-
t('status.field.health'),
|
|
88
|
-
health.ok
|
|
89
|
-
? `${icon.ok} ${brand.dim(healthUrl)}`
|
|
90
|
-
: brand.dim(t('status.apiUnreachable', { url: healthUrl }))
|
|
91
|
-
)
|
|
92
|
-
);
|
|
93
|
-
if (health.ok && health.data?.data) {
|
|
94
|
-
const db = health.data.data.database;
|
|
95
|
-
const dbOk = db === 'up';
|
|
96
|
-
console.log(
|
|
97
|
-
fieldRow(
|
|
98
|
-
t('status.field.database'),
|
|
99
|
-
statusPill(dbOk, { on: t('status.dbUp'), off: t('status.dbDown') })
|
|
100
|
-
)
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
const pidAlive = pid && isProcessRunning(pid);
|
|
104
|
-
console.log(
|
|
105
|
-
fieldRow(
|
|
106
|
-
t('status.field.pid'),
|
|
107
|
-
`${brand.dim(pid ?? '—')}${pidAlive ? ` ${brand.success(t('status.pidRunning'))}` : ''}`
|
|
108
|
-
)
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
console.log('');
|
|
112
|
-
console.log(sectionHeader(t('status.section.frontend')));
|
|
113
|
-
console.log(fieldRow(t('status.field.url'), brand.dim(clientUrl)));
|
|
114
|
-
console.log(fieldRow(t('status.field.http'), statusPill(clientHttp, httpOn)));
|
|
115
|
-
|
|
116
|
-
console.log('');
|
|
117
|
-
console.log(sectionHeader(t('status.section.docker')));
|
|
118
|
-
console.log(
|
|
119
|
-
fieldRow(
|
|
120
|
-
t('status.field.engine'),
|
|
121
|
-
statusPill(isDockerRunning(), {
|
|
122
|
-
on: t('status.dockerUp'),
|
|
123
|
-
off: t('status.dockerDown'),
|
|
124
|
-
})
|
|
125
|
-
)
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
console.log(` ${divider(w)}`);
|
|
129
|
-
console.log('');
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
module.exports = { printUnifiedStatus, envFileStatus };
|