@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/ui/banner.js
DELETED
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
const os = require('os');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const chalk = require('chalk');
|
|
4
|
-
const {
|
|
5
|
-
brand,
|
|
6
|
-
icon,
|
|
7
|
-
palette,
|
|
8
|
-
visibleLength,
|
|
9
|
-
padRight,
|
|
10
|
-
terminalWidth,
|
|
11
|
-
gradientText,
|
|
12
|
-
pulseBar,
|
|
13
|
-
statusLights,
|
|
14
|
-
} = require('./theme');
|
|
15
|
-
const { t } = require('../lib/i18n');
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* "REACTPRESS" rendered in the ANSI Shadow font.
|
|
19
|
-
* Each row is exactly 81 single-cell columns, so we can size the surrounding
|
|
20
|
-
* cyber-card deterministically without measuring per-glyph widths.
|
|
21
|
-
*/
|
|
22
|
-
const TECH_LOGO = [
|
|
23
|
-
'██████╗ ███████╗ █████╗ ██████╗████████╗██████╗ ██████╗ ███████╗███████╗███████╗',
|
|
24
|
-
'██╔══██╗██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██╔════╝██╔════╝',
|
|
25
|
-
'██████╔╝█████╗ ███████║██║ ██║ ██████╔╝██████╔╝█████╗ ███████╗███████╗',
|
|
26
|
-
'██╔══██╗██╔══╝ ██╔══██║██║ ██║ ██╔═══╝ ██╔══██╗██╔══╝ ╚════██║╚════██║',
|
|
27
|
-
'██║ ██║███████╗██║ ██║╚██████╗ ██║ ██║ ██║ ██║███████╗███████║███████║',
|
|
28
|
-
'╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝',
|
|
29
|
-
];
|
|
30
|
-
|
|
31
|
-
const LOGO_WIDTH = 81;
|
|
32
|
-
const LOGO_GRADIENTS = [
|
|
33
|
-
[palette.pink, palette.primary],
|
|
34
|
-
[palette.pink, palette.primary],
|
|
35
|
-
[palette.primary, palette.accent],
|
|
36
|
-
[palette.primary, palette.accent],
|
|
37
|
-
[palette.accent, palette.primary],
|
|
38
|
-
[palette.accent, palette.primary],
|
|
39
|
-
];
|
|
40
|
-
|
|
41
|
-
const REPO_URL = 'https://github.com/fecommunity/reactpress';
|
|
42
|
-
/**
|
|
43
|
-
* Shorter, human-friendly form of REPO_URL shown beneath the title bar.
|
|
44
|
-
* The clickable hyperlink still resolves to the full https:// URL via
|
|
45
|
-
* `hyperlink()`, so users can `cmd+click` from any modern terminal.
|
|
46
|
-
*/
|
|
47
|
-
const REPO_DISPLAY = 'github.com/fecommunity/reactpress';
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Wrap text in an OSC-8 hyperlink escape so terminals that support it (iTerm2,
|
|
51
|
-
* Warp, WezTerm, modern macOS Terminal, VS Code, GNOME Terminal, Kitty, …)
|
|
52
|
-
* render the label as a clickable link. We only emit the escape sequence when
|
|
53
|
-
* stdout is a real TTY — otherwise (CI logs, file redirects, dumb terminals)
|
|
54
|
-
* we fall back to the plain styled label so users never see the raw `]8;;`.
|
|
55
|
-
*/
|
|
56
|
-
function hyperlink(url, label) {
|
|
57
|
-
if (!process.stdout.isTTY) return label;
|
|
58
|
-
if (process.env.TERM === 'dumb') return label;
|
|
59
|
-
return `\u001B]8;;${url}\u0007${label}\u001B]8;;\u0007`;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function safeReadCliVersion() {
|
|
63
|
-
try {
|
|
64
|
-
return require(path.join(__dirname, '..', 'package.json')).version;
|
|
65
|
-
} catch {
|
|
66
|
-
return 'dev';
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function homify(p) {
|
|
71
|
-
if (!p) return p;
|
|
72
|
-
const home = os.homedir();
|
|
73
|
-
if (home && p.startsWith(home)) {
|
|
74
|
-
return '~' + p.slice(home.length);
|
|
75
|
-
}
|
|
76
|
-
return p;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function renderLogoLines() {
|
|
80
|
-
return TECH_LOGO.map((line, i) => gradientText(line, LOGO_GRADIENTS[i]));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function modeChip(type) {
|
|
84
|
-
if (type === 'monorepo') {
|
|
85
|
-
return chalk
|
|
86
|
-
.bgHex(palette.primary)
|
|
87
|
-
.hex('#0B1220')
|
|
88
|
-
.bold(` ${t('banner.mode.monorepo')} `);
|
|
89
|
-
}
|
|
90
|
-
if (type === 'standalone') {
|
|
91
|
-
return chalk
|
|
92
|
-
.bgHex(palette.accent)
|
|
93
|
-
.hex('#0B1220')
|
|
94
|
-
.bold(` ${t('banner.mode.standalone')} `);
|
|
95
|
-
}
|
|
96
|
-
return chalk
|
|
97
|
-
.bgHex(palette.gray)
|
|
98
|
-
.hex('#0B1220')
|
|
99
|
-
.bold(` ${t('banner.mode.uninitialized')} `);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Decide how "ready" the welcome banner should look. When a fully
|
|
104
|
-
* initialized project is detected we render the pulse bar at 100% and
|
|
105
|
-
* report `ONLINE` status, instead of the static 70% placeholder that used
|
|
106
|
-
* to make `doctor` runs look incomplete even when everything passed.
|
|
107
|
-
*/
|
|
108
|
-
function bannerReadyState(options) {
|
|
109
|
-
const type = options && options.project && options.project.type;
|
|
110
|
-
if (type === 'monorepo' || type === 'standalone') {
|
|
111
|
-
return { ratio: 1, ready: true };
|
|
112
|
-
}
|
|
113
|
-
return { ratio: 0.4, ready: false };
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Build the top edge of the cyber-card with a centered title block:
|
|
118
|
-
* ╔══════════[ REACTPRESS · v3.0.3 ]══════════╗
|
|
119
|
-
*/
|
|
120
|
-
function brandedTopBorder(version, width) {
|
|
121
|
-
const titleBlock =
|
|
122
|
-
brand.primary('[') +
|
|
123
|
-
' ' +
|
|
124
|
-
gradientText('REACTPRESS', [palette.primary, palette.accent], { bold: true }) +
|
|
125
|
-
' ' +
|
|
126
|
-
brand.muted('·') +
|
|
127
|
-
' ' +
|
|
128
|
-
brand.accent(`v${version}`) +
|
|
129
|
-
' ' +
|
|
130
|
-
brand.primary(']');
|
|
131
|
-
const dashTotal = Math.max(0, width - 2 - visibleLength(titleBlock));
|
|
132
|
-
const left = Math.floor(dashTotal / 2);
|
|
133
|
-
const right = dashTotal - left;
|
|
134
|
-
return (
|
|
135
|
-
brand.primary('╔' + '═'.repeat(left)) +
|
|
136
|
-
titleBlock +
|
|
137
|
-
brand.primary('═'.repeat(right) + '╗')
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function bottomBorder(width) {
|
|
142
|
-
return brand.primary('╚' + '═'.repeat(width - 2) + '╝');
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function bodyLine(content, innerWidth) {
|
|
146
|
-
const padded = padRight(content, innerWidth);
|
|
147
|
-
return brand.primary('║ ') + padded + brand.primary(' ║');
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function emptyBodyLine(innerWidth) {
|
|
151
|
-
return bodyLine('', innerWidth);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* A subtle "CRT scan-line" rendered just under the logo.
|
|
156
|
-
* ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
|
|
157
|
-
*/
|
|
158
|
-
function scanline(width) {
|
|
159
|
-
return brand.muted('▔'.repeat(width));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Width of the left-side banner label column.
|
|
164
|
-
*
|
|
165
|
-
* Sized to fit our longest English label (`MODE` / `PATH` → 4 cells)
|
|
166
|
-
* plus a 2-cell trailing gap, which also accommodates the Chinese
|
|
167
|
-
* translations `模式` / `路径` (4 East-Asian cells each).
|
|
168
|
-
*/
|
|
169
|
-
const LABEL_WIDTH = 6;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Centered, dim repo subtitle that sits directly under the top border.
|
|
173
|
-
* Replaces the previous in-body `◇ REPO ↗ …` row, which competed visually
|
|
174
|
-
* with the operational fields (MODE / PATH / pulse) further down.
|
|
175
|
-
*/
|
|
176
|
-
function repoSubline(innerWidth) {
|
|
177
|
-
const link =
|
|
178
|
-
brand.muted('↗ ') + hyperlink(REPO_URL, brand.accent.underline(REPO_DISPLAY));
|
|
179
|
-
const pad = Math.max(0, Math.floor((innerWidth - visibleLength(link)) / 2));
|
|
180
|
-
return ' '.repeat(pad) + link;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Single-cell-wide chip label, e.g. `◇ MODE ▸ monorepo`.
|
|
185
|
-
*/
|
|
186
|
-
function infoRow(label, value) {
|
|
187
|
-
return (
|
|
188
|
-
brand.accent('◇ ') +
|
|
189
|
-
brand.muted(padRight(label, LABEL_WIDTH)) +
|
|
190
|
-
' ' +
|
|
191
|
-
brand.primary('▸ ') +
|
|
192
|
-
brand.dim(value)
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Render the "command rail" navigation footer:
|
|
198
|
-
* ⟫ init ⟫ dev ⟫ build ⟫ deploy ⟫ publish
|
|
199
|
-
*/
|
|
200
|
-
function commandRail() {
|
|
201
|
-
const items = ['init', 'dev', 'build', 'deploy', 'publish'];
|
|
202
|
-
return items
|
|
203
|
-
.map(
|
|
204
|
-
(name) =>
|
|
205
|
-
brand.primary('⟫ ') + gradientText(name, [palette.primary, palette.accent])
|
|
206
|
-
)
|
|
207
|
-
.join(brand.muted(' '));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Wide, full-fat cyber banner: ASCII logo + scan-line + bordered card.
|
|
212
|
-
*/
|
|
213
|
-
function printWideBanner(version, options) {
|
|
214
|
-
const cols = terminalWidth();
|
|
215
|
-
const cardWidth = Math.min(Math.max(LOGO_WIDTH + 8, 88), cols - 2);
|
|
216
|
-
const innerWidth = cardWidth - 4;
|
|
217
|
-
|
|
218
|
-
const lines = [];
|
|
219
|
-
lines.push('');
|
|
220
|
-
lines.push(' ' + brandedTopBorder(version, cardWidth));
|
|
221
|
-
lines.push(' ' + bodyLine(repoSubline(innerWidth), innerWidth));
|
|
222
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
223
|
-
|
|
224
|
-
const logoIndent = Math.max(0, Math.floor((innerWidth - LOGO_WIDTH) / 2));
|
|
225
|
-
const indent = ' '.repeat(logoIndent);
|
|
226
|
-
for (const logoLine of renderLogoLines()) {
|
|
227
|
-
lines.push(' ' + bodyLine(indent + logoLine, innerWidth));
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
const scanWidth = Math.min(innerWidth - 2, LOGO_WIDTH);
|
|
231
|
-
const scanIndent = ' '.repeat(Math.max(0, Math.floor((innerWidth - scanWidth) / 2)));
|
|
232
|
-
lines.push(' ' + bodyLine(scanIndent + scanline(scanWidth), innerWidth));
|
|
233
|
-
|
|
234
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
235
|
-
|
|
236
|
-
const ready = bannerReadyState(options);
|
|
237
|
-
const subtitle =
|
|
238
|
-
chalk.bold(brand.accent('◆ ')) +
|
|
239
|
-
gradientText(t('banner.subtitle').trim(), [palette.accent, palette.primary, palette.pink], {
|
|
240
|
-
bold: true,
|
|
241
|
-
});
|
|
242
|
-
const stateLabel = ready.ready
|
|
243
|
-
? brand.success(t('banner.systemOnline').trim())
|
|
244
|
-
: brand.warn(t('banner.systemPending').trim());
|
|
245
|
-
const right =
|
|
246
|
-
statusLights(ready.ready ? 'online' : 'pending') +
|
|
247
|
-
' ' +
|
|
248
|
-
brand.dim(t('banner.systemLabel').trim() + ' ') +
|
|
249
|
-
stateLabel;
|
|
250
|
-
lines.push(' ' + bodyLine(subtitle + spacer(subtitle, right, innerWidth) + right, innerWidth));
|
|
251
|
-
|
|
252
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
253
|
-
|
|
254
|
-
if (options.project) {
|
|
255
|
-
lines.push(
|
|
256
|
-
' ' +
|
|
257
|
-
bodyLine(
|
|
258
|
-
brand.accent('◇ ') +
|
|
259
|
-
brand.muted(padRight(t('banner.label.mode').trim(), LABEL_WIDTH)) +
|
|
260
|
-
' ' +
|
|
261
|
-
modeChip(options.project.type),
|
|
262
|
-
innerWidth
|
|
263
|
-
)
|
|
264
|
-
);
|
|
265
|
-
}
|
|
266
|
-
if (options.projectRoot) {
|
|
267
|
-
lines.push(
|
|
268
|
-
' ' +
|
|
269
|
-
bodyLine(
|
|
270
|
-
infoRow(t('banner.label.path').trim(), homify(options.projectRoot)),
|
|
271
|
-
innerWidth
|
|
272
|
-
)
|
|
273
|
-
);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
const pulseWidth = Math.min(28, innerWidth - 18);
|
|
277
|
-
if (pulseWidth > 8) {
|
|
278
|
-
const filled = Math.max(1, Math.min(pulseWidth, Math.round(pulseWidth * ready.ratio)));
|
|
279
|
-
const pulse = pulseBar(pulseWidth, filled);
|
|
280
|
-
const pulseStatus = ready.ready
|
|
281
|
-
? t('banner.pulseReady').trim()
|
|
282
|
-
: t('banner.pulsePending').trim();
|
|
283
|
-
const pulseLine =
|
|
284
|
-
brand.accent('◇ ') +
|
|
285
|
-
brand.muted(padRight(t('banner.pulseLabel').trim(), LABEL_WIDTH)) +
|
|
286
|
-
' ' +
|
|
287
|
-
pulse +
|
|
288
|
-
' ' +
|
|
289
|
-
(ready.ready ? brand.success(pulseStatus) : brand.warn(pulseStatus));
|
|
290
|
-
lines.push(' ' + bodyLine(pulseLine, innerWidth));
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
294
|
-
lines.push(' ' + bottomBorder(cardWidth));
|
|
295
|
-
lines.push(' ' + commandRail());
|
|
296
|
-
lines.push('');
|
|
297
|
-
|
|
298
|
-
for (const line of lines) console.log(line);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Pad between a left-aligned and a right-aligned segment so they sit on the
|
|
303
|
-
* same line of the cyber card.
|
|
304
|
-
*/
|
|
305
|
-
function spacer(left, right, innerWidth) {
|
|
306
|
-
const used = visibleLength(left) + visibleLength(right);
|
|
307
|
-
const gap = Math.max(2, innerWidth - used);
|
|
308
|
-
return ' '.repeat(gap);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
* Compact cyber banner for terminals that cannot host the full ASCII logo.
|
|
313
|
-
*/
|
|
314
|
-
function printCompactBanner(version, options) {
|
|
315
|
-
const cols = terminalWidth();
|
|
316
|
-
const cardWidth = Math.min(cols - 2, 76);
|
|
317
|
-
const innerWidth = cardWidth - 4;
|
|
318
|
-
|
|
319
|
-
const lines = [];
|
|
320
|
-
lines.push('');
|
|
321
|
-
lines.push(' ' + brandedTopBorder(version, cardWidth));
|
|
322
|
-
lines.push(' ' + bodyLine(repoSubline(innerWidth), innerWidth));
|
|
323
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
324
|
-
|
|
325
|
-
const ready = bannerReadyState(options);
|
|
326
|
-
const wordmark =
|
|
327
|
-
brand.primary('▌▍▎ ') +
|
|
328
|
-
gradientText('REACTPRESS', [palette.pink, palette.primary, palette.accent], {
|
|
329
|
-
bold: true,
|
|
330
|
-
}) +
|
|
331
|
-
brand.primary(' ▎▍▌');
|
|
332
|
-
const lights = statusLights(ready.ready ? 'online' : 'pending');
|
|
333
|
-
lines.push(
|
|
334
|
-
' ' + bodyLine(wordmark + spacer(wordmark, lights, innerWidth) + lights, innerWidth)
|
|
335
|
-
);
|
|
336
|
-
|
|
337
|
-
const subtitle =
|
|
338
|
-
chalk.bold(brand.accent('◆ ')) + brand.dim(t('banner.subtitle').trim());
|
|
339
|
-
lines.push(' ' + bodyLine(subtitle, innerWidth));
|
|
340
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
341
|
-
|
|
342
|
-
if (options.project) {
|
|
343
|
-
lines.push(
|
|
344
|
-
' ' +
|
|
345
|
-
bodyLine(
|
|
346
|
-
brand.accent('◇ ') +
|
|
347
|
-
brand.muted(padRight(t('banner.label.mode').trim(), LABEL_WIDTH)) +
|
|
348
|
-
' ' +
|
|
349
|
-
modeChip(options.project.type),
|
|
350
|
-
innerWidth
|
|
351
|
-
)
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
if (options.projectRoot) {
|
|
355
|
-
lines.push(
|
|
356
|
-
' ' +
|
|
357
|
-
bodyLine(
|
|
358
|
-
infoRow(t('banner.label.path').trim(), homify(options.projectRoot)),
|
|
359
|
-
innerWidth
|
|
360
|
-
)
|
|
361
|
-
);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
365
|
-
lines.push(' ' + bottomBorder(cardWidth));
|
|
366
|
-
lines.push(' ' + commandRail());
|
|
367
|
-
lines.push('');
|
|
368
|
-
|
|
369
|
-
for (const line of lines) console.log(line);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Single-line banner for ultra-narrow terminals (CI logs, embedded shells).
|
|
374
|
-
*/
|
|
375
|
-
function printMinimalBanner(version, options) {
|
|
376
|
-
const ready = bannerReadyState(options);
|
|
377
|
-
const wordmark = gradientText('REACTPRESS', [palette.pink, palette.primary, palette.accent], {
|
|
378
|
-
bold: true,
|
|
379
|
-
});
|
|
380
|
-
console.log('');
|
|
381
|
-
console.log(` ${brand.primary('▌▍▎')} ${wordmark} ${brand.muted('·')} ${brand.accent(`v${version}`)} ${statusLights(ready.ready ? 'online' : 'pending')}`);
|
|
382
|
-
console.log(` ${brand.dim(t('banner.subtitle').trim())}`);
|
|
383
|
-
if (options.project) {
|
|
384
|
-
console.log(` ${modeChip(options.project.type)}`);
|
|
385
|
-
}
|
|
386
|
-
if (options.projectRoot) {
|
|
387
|
-
console.log(` ${icon.bullet} ${brand.dim(homify(options.projectRoot))}`);
|
|
388
|
-
}
|
|
389
|
-
console.log(
|
|
390
|
-
` ${brand.muted('↗')} ${hyperlink(REPO_URL, brand.accent.underline(REPO_URL))}`
|
|
391
|
-
);
|
|
392
|
-
console.log('');
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Print the top-of-screen banner. Adaptive to terminal width: collapses to a
|
|
397
|
-
* single-line greeting on very narrow terminals, otherwise renders a bordered
|
|
398
|
-
* cyber-card with the full ANSI Shadow logo when there is room.
|
|
399
|
-
*
|
|
400
|
-
* @param {{
|
|
401
|
-
* projectRoot?: string,
|
|
402
|
-
* project?: { type: string, hasClient: boolean, hasServerSource: boolean }
|
|
403
|
-
* }} [options]
|
|
404
|
-
*/
|
|
405
|
-
function printBanner(options = {}) {
|
|
406
|
-
const version = safeReadCliVersion();
|
|
407
|
-
const cols = terminalWidth();
|
|
408
|
-
|
|
409
|
-
if (cols < 64) {
|
|
410
|
-
printMinimalBanner(version, options);
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
if (cols < LOGO_WIDTH + 10) {
|
|
415
|
-
printCompactBanner(version, options);
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
printWideBanner(version, options);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Box helper retained for backwards compatibility: a few callers still
|
|
424
|
-
* import `box` from this module to wrap arbitrary multi-line content.
|
|
425
|
-
*/
|
|
426
|
-
function box(lines, { width } = {}) {
|
|
427
|
-
const innerWidth = width
|
|
428
|
-
? width - 4
|
|
429
|
-
: lines.reduce((max, line) => Math.max(max, visibleLength(line)), 0);
|
|
430
|
-
|
|
431
|
-
const horizontal = '═'.repeat(innerWidth + 2);
|
|
432
|
-
const top = brand.primary(` ╔${horizontal}╗`);
|
|
433
|
-
const bottom = brand.primary(` ╚${horizontal}╝`);
|
|
434
|
-
const body = lines.map((line) => {
|
|
435
|
-
const padded = padRight(line, innerWidth);
|
|
436
|
-
return brand.primary(' ║ ') + padded + brand.primary(' ║');
|
|
437
|
-
});
|
|
438
|
-
return [top, ...body, bottom];
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
module.exports = { printBanner, visibleLength, padRight, box };
|