@fecommunity/reactpress 4.0.0-beta.1 → 4.0.0-beta.11
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/README.md +20 -26
- package/dist/utils/server-bundle.js +7 -0
- package/out/bin/reactpress-theme-client.js +64 -1
- package/out/bin/reactpress.js +96 -514
- package/out/core/services/config.js +4 -1
- package/out/core/services/database/index.js +18 -5
- package/out/core/services/database/sqlite.js +28 -5
- package/out/core/services/init.js +1 -53
- package/out/core/services/local-site.js +15 -10
- package/out/core/services/theme-bootstrap.js +51 -0
- package/out/core/utils/env-file.js +99 -0
- package/out/core/utils/paths.js +5 -4
- package/out/lib/api-dev.js +11 -1
- package/out/lib/bootstrap.js +13 -40
- package/out/lib/cli-events.js +54 -0
- package/out/lib/command-palette.js +53 -0
- package/out/lib/context-status.js +154 -0
- package/out/lib/create-site.js +187 -0
- package/out/lib/database-mode.js +45 -0
- package/out/lib/design-tokens.js +55 -0
- package/out/lib/dev-banner.js +10 -5
- package/out/lib/dev-session.js +9 -2
- package/out/lib/dev.js +68 -25
- package/out/lib/docker.js +12 -0
- package/out/lib/doctor.js +131 -10
- package/out/lib/http.js +20 -0
- package/out/lib/i18n/index.js +5 -1
- package/out/lib/i18n/strings.js +161 -81
- package/out/lib/lifecycle.js +21 -1
- package/out/lib/menu-actions.js +418 -0
- package/out/lib/nginx.js +5 -2
- package/out/lib/paths.js +11 -0
- package/out/lib/pm2.js +9 -2
- package/out/lib/ports.js +134 -13
- package/out/lib/publish.js +3 -0
- package/out/lib/remote-dev.js +5 -1
- package/out/lib/server-bundle.js +84 -0
- package/out/lib/shell-mode.js +23 -0
- package/out/lib/theme-warmup.js +1 -1
- package/out/shell/app.js +384 -0
- package/out/shell/components/brand-banner.js +93 -0
- package/out/shell/components/command-palette.js +77 -0
- package/out/shell/components/dev-stepper.js +54 -0
- package/out/shell/components/ink-theme.js +86 -0
- package/out/shell/components/menu-list.js +49 -0
- package/out/shell/components/pulse-bar.js +55 -0
- package/out/shell/components/status-rack.js +47 -0
- package/out/shell/hooks/use-terminal-size.js +27 -0
- package/out/shell/ink-shell.mjs +12056 -0
- package/out/shell/lib/shell-layout.js +60 -0
- package/out/shell/runtime/render-ink.js +89 -0
- package/out/ui/banner-startup.js +117 -0
- package/out/ui/banner.js +404 -277
- package/out/ui/interactive.js +149 -125
- package/out/ui/startup-splash.js +185 -0
- package/out/ui/theme.js +62 -10
- package/package.json +5 -3
- package/server/bin/reactpress-server.js +29 -2
- package/server/dist/app.module.js +18 -30
- package/server/dist/filters/http-exception.filter.js +1 -1
- package/server/dist/generate-swagger.js +12 -11
- package/server/dist/interceptors/transform.interceptor.js +10 -5
- package/server/dist/logger/index.js +5 -4
- package/server/dist/main.js +47 -23
- package/server/dist/modules/article/article.controller.js +103 -48
- package/server/dist/modules/article/article.entity.js +61 -41
- package/server/dist/modules/article/article.module.js +18 -3
- package/server/dist/modules/article/article.service.js +151 -29
- package/server/dist/modules/auth/auth.controller.js +11 -11
- package/server/dist/modules/auth/auth.module.js +4 -4
- package/server/dist/modules/auth/auth.service.js +8 -7
- package/server/dist/modules/auth/jwt-auth.guard.js +4 -3
- package/server/dist/modules/auth/jwt.strategy.js +4 -3
- package/server/dist/modules/auth/roles.guard.js +2 -2
- package/server/dist/modules/category/category.controller.js +21 -20
- package/server/dist/modules/category/category.entity.js +13 -13
- package/server/dist/modules/category/category.module.js +1 -1
- package/server/dist/modules/category/category.service.js +5 -4
- package/server/dist/modules/comment/comment.controller.js +24 -20
- package/server/dist/modules/comment/comment.entity.js +31 -31
- package/server/dist/modules/comment/comment.module.js +11 -2
- package/server/dist/modules/comment/comment.service.js +43 -16
- package/server/dist/modules/comment/html.js +3 -3
- package/server/dist/modules/extension/preview-draft.store.js +1 -1
- package/server/dist/modules/extension/theme.service.js +19 -19
- package/server/dist/modules/file/file.controller.js +22 -20
- package/server/dist/modules/file/file.entity.js +20 -15
- package/server/dist/modules/file/file.module.js +16 -4
- package/server/dist/modules/file/file.service.js +70 -24
- package/server/dist/modules/install/install.controller.js +5 -5
- package/server/dist/modules/install/install.module.js +1 -1
- package/server/dist/modules/install/install.service.js +2 -2
- package/server/dist/modules/knowledge/knowledge.controller.js +35 -33
- package/server/dist/modules/knowledge/knowledge.entity.js +33 -33
- package/server/dist/modules/knowledge/knowledge.module.js +1 -1
- package/server/dist/modules/knowledge/knowledge.service.js +12 -11
- package/server/dist/modules/page/page.controller.js +24 -23
- package/server/dist/modules/page/page.entity.js +27 -27
- package/server/dist/modules/page/page.module.js +1 -1
- package/server/dist/modules/page/page.service.js +12 -12
- package/server/dist/modules/search/search.controller.js +12 -12
- package/server/dist/modules/search/search.entity.js +13 -13
- package/server/dist/modules/search/search.module.js +1 -1
- package/server/dist/modules/search/search.service.js +2 -2
- package/server/dist/modules/setting/setting.constant.js +3 -19
- package/server/dist/modules/setting/setting.controller.js +11 -11
- package/server/dist/modules/setting/setting.entity.js +64 -49
- package/server/dist/modules/setting/setting.module.js +2 -2
- package/server/dist/modules/setting/setting.service.js +169 -24
- package/server/dist/modules/smtp/mail.util.js +5 -9
- package/server/dist/modules/smtp/smtp.controller.js +27 -14
- package/server/dist/modules/smtp/smtp.entity.js +15 -15
- package/server/dist/modules/smtp/smtp.module.js +2 -2
- package/server/dist/modules/smtp/smtp.service.js +40 -12
- package/server/dist/modules/tag/tag.controller.js +24 -22
- package/server/dist/modules/tag/tag.entity.js +12 -12
- package/server/dist/modules/tag/tag.module.js +1 -1
- package/server/dist/modules/tag/tag.service.js +5 -4
- package/server/dist/modules/user/user.controller.js +39 -28
- package/server/dist/modules/user/user.entity.js +22 -22
- package/server/dist/modules/user/user.module.js +2 -2
- package/server/dist/modules/user/user.service.js +16 -12
- package/server/dist/modules/view/view.controller.js +20 -19
- package/server/dist/modules/view/view.entity.js +24 -24
- package/server/dist/modules/view/view.module.js +1 -1
- package/server/dist/modules/view/view.service.js +4 -4
- package/server/dist/starter.js +202 -14
- package/server/dist/utils/date.util.js +1 -1
- package/server/dist/utils/markdown.util.js +1 -1
- package/server/dist/utils/oss/aliyun-oss-client.js +5 -0
- package/server/dist/utils/oss.util.js +6 -1
- package/server/dist/utils/theme-placeholder-cover.js +94 -0
- package/server/dist/utils/uniqueid.util.js +1 -1
- package/server/dist/utils/upload.util.js +23 -8
- package/server/dist/utils/user.util.js +6 -2
- package/server/package-lock.json +21114 -0
- package/server/package.json +13 -10
- package/server/public/favicon.png +0 -0
- package/templates/config.local.json +1 -1
- package/templates/env.local.default +1 -1
- package/toolkit/dist/.source-fingerprint-toolkit +1 -0
- package/toolkit/dist/admin/index.js +18 -0
- package/toolkit/dist/admin/permissions.js +33 -0
- package/toolkit/dist/admin/registry.js +79 -0
- package/toolkit/dist/api/Article.js +188 -0
- package/toolkit/dist/api/Auth.js +58 -0
- package/toolkit/dist/api/Category.js +84 -0
- package/toolkit/dist/api/Comment.js +97 -0
- package/toolkit/dist/api/File.js +71 -0
- package/toolkit/dist/api/HttpClient.js +96 -0
- package/toolkit/dist/api/Knowledge.js +123 -0
- package/toolkit/dist/api/Page.js +97 -0
- package/toolkit/dist/api/Search.js +58 -0
- package/toolkit/dist/api/Setting.js +45 -0
- package/toolkit/dist/api/Smtp.js +73 -0
- package/toolkit/dist/api/Tag.js +97 -0
- package/toolkit/dist/api/User.js +72 -0
- package/toolkit/dist/api/View.js +84 -0
- package/toolkit/dist/api/index.js +30 -0
- package/toolkit/dist/api/instance.js +71 -0
- package/toolkit/dist/app/createReactPressApp.js +265 -0
- package/toolkit/dist/app/createThemeApp.js +51 -0
- package/toolkit/dist/app/devChunkRecovery.js +68 -0
- package/toolkit/dist/app/index.js +11 -0
- package/toolkit/dist/config/env.js +103 -0
- package/toolkit/dist/config/global.js +396 -0
- package/toolkit/dist/config/i18n.js +59 -0
- package/toolkit/dist/config/index.js +26 -0
- package/toolkit/dist/config/locales/en.json +125 -0
- package/toolkit/dist/config/locales/zh.json +125 -0
- package/toolkit/dist/dev/index.js +12 -0
- package/toolkit/dist/dev/portRedirect.js +93 -0
- package/toolkit/dist/dev/vitePortRedirectPlugin.js +40 -0
- package/toolkit/dist/extension/branding-mods.js +65 -0
- package/toolkit/dist/extension/configuration/defaults.js +32 -0
- package/toolkit/dist/extension/configuration/formily.js +170 -0
- package/toolkit/dist/extension/configuration/index.js +28 -0
- package/toolkit/dist/extension/configuration/paths.js +50 -0
- package/toolkit/dist/extension/configuration/presets/twentytwentyfive.js +94 -0
- package/toolkit/dist/extension/configuration/resolve.js +98 -0
- package/toolkit/dist/extension/configuration/types.js +3 -0
- package/toolkit/dist/extension/configuration/validate.js +21 -0
- package/toolkit/dist/extension/index.js +35 -0
- package/toolkit/dist/extension/manifest-normalize.js +75 -0
- package/toolkit/dist/extension/node.js +6 -0
- package/toolkit/dist/extension/presets/twentytwentyfive-appearance.js +193 -0
- package/toolkit/dist/extension/presets/twentytwentyfive-customizer.js +199 -0
- package/toolkit/dist/extension/preview.js +92 -0
- package/toolkit/dist/extension/site-notices.js +88 -0
- package/toolkit/dist/extension/site-settings.js +144 -0
- package/toolkit/dist/extension/theme-admin-locale.io.js +54 -0
- package/toolkit/dist/extension/theme-admin-locale.js +81 -0
- package/toolkit/dist/extension/theme.js +93 -0
- package/toolkit/dist/extension/twentytwentyfive-vars.js +100 -0
- package/toolkit/dist/index.js +60 -0
- package/toolkit/dist/plugin/admin/index.js +20 -0
- package/toolkit/dist/plugin/admin/permissions.js +33 -0
- package/toolkit/dist/plugin/admin/plugin-admin.js +41 -0
- package/toolkit/dist/plugin/admin/registry.js +79 -0
- package/toolkit/dist/plugin/admin/slots.js +16 -0
- package/toolkit/dist/plugin/client/client.js +95 -0
- package/toolkit/dist/plugin/client/index.js +11 -0
- package/toolkit/dist/plugin/client/runtime.js +30 -0
- package/toolkit/dist/plugin/dev/index.js +16 -0
- package/toolkit/dist/plugin/dev/portRedirect.js +111 -0
- package/toolkit/dist/plugin/dev/vitePortRedirectPlugin.js +40 -0
- package/toolkit/dist/plugin/extension/index.js +20 -0
- package/toolkit/dist/plugin/extension/plugin-admin-locale.io.js +54 -0
- package/toolkit/dist/plugin/extension/plugin-admin-locale.js +60 -0
- package/toolkit/dist/plugin/extension/plugin.js +146 -0
- package/toolkit/dist/plugin/extension/security.js +74 -0
- package/toolkit/dist/plugin/extension/validate.js +55 -0
- package/toolkit/dist/plugin/index.js +52 -0
- package/toolkit/dist/plugin/node.js +6 -0
- package/toolkit/dist/plugin/react/client.js +95 -0
- package/toolkit/dist/plugin/react/index.js +19 -0
- package/toolkit/dist/plugin/react/plugin-admin-ui.js +38 -0
- package/toolkit/dist/plugin/react/runtime.js +30 -0
- package/toolkit/dist/plugin/server/hook-reject.js +39 -0
- package/toolkit/dist/plugin/server/index.js +18 -0
- package/toolkit/dist/plugin/server/types.js +3 -0
- package/toolkit/dist/primitives/AntdStyleTransitionFix.js +16 -0
- package/toolkit/dist/primitives/Badge.js +9 -0
- package/toolkit/dist/primitives/Button.js +38 -0
- package/toolkit/dist/primitives/ColorModeToggle.js +13 -0
- package/toolkit/dist/primitives/IconButton.js +13 -0
- package/toolkit/dist/primitives/ScrollToTarget.js +48 -0
- package/toolkit/dist/primitives/Separator.js +9 -0
- package/toolkit/dist/primitives/Skeleton.js +9 -0
- package/toolkit/dist/primitives/Slot.js +25 -0
- package/toolkit/dist/primitives/Spinner.js +9 -0
- package/toolkit/dist/primitives/animation/ConditionTransition.js +13 -0
- package/toolkit/dist/primitives/animation/ListTrail.js +14 -0
- package/toolkit/dist/primitives/animation/Opacity.js +10 -0
- package/toolkit/dist/primitives/animation/Spring.js +29 -0
- package/toolkit/dist/primitives/animation/index.js +11 -0
- package/toolkit/dist/primitives/cn.js +7 -0
- package/toolkit/dist/primitives/icons.js +15 -0
- package/toolkit/dist/primitives/index.js +44 -0
- package/toolkit/dist/react/client.js +95 -0
- package/toolkit/dist/react/index.js +11 -0
- package/toolkit/dist/react/runtime.js +30 -0
- package/toolkit/dist/theme/antdDocument.js +59 -0
- package/toolkit/dist/theme/api/api-data.js +8 -0
- package/toolkit/dist/theme/api/api.js +27 -0
- package/toolkit/dist/theme/api/httpClient.js +83 -0
- package/toolkit/dist/theme/api/json.js +5 -0
- package/toolkit/dist/theme/api/jsonp.js +5 -0
- package/toolkit/dist/theme/api-data.js +22 -0
- package/toolkit/dist/theme/api.js +27 -0
- package/toolkit/dist/theme/appearance.js +16 -0
- package/toolkit/dist/theme/assets.js +27 -0
- package/toolkit/dist/theme/authSession.js +92 -0
- package/toolkit/dist/theme/build/antdDocument.js +70 -0
- package/toolkit/dist/theme/build/next-config.js +63 -0
- package/toolkit/dist/theme/build/node.js +6 -0
- package/toolkit/dist/theme/colorMode.js +45 -0
- package/toolkit/dist/theme/commentAuthor.js +48 -0
- package/toolkit/dist/theme/content/archiveSlim.js +38 -0
- package/toolkit/dist/theme/content/articleSlim.js +35 -0
- package/toolkit/dist/theme/content/assets.js +106 -0
- package/toolkit/dist/theme/content/carouselArticles.js +39 -0
- package/toolkit/dist/theme/content/excerpt.js +42 -0
- package/toolkit/dist/theme/content/nav.js +30 -0
- package/toolkit/dist/theme/content/seo.js +12 -0
- package/toolkit/dist/theme/createAntdApp.js +175 -0
- package/toolkit/dist/theme/createApp.js +141 -0
- package/toolkit/dist/theme/createCatalogApp.js +168 -0
- package/toolkit/dist/theme/customizer.js +5 -0
- package/toolkit/dist/theme/excerpt.js +31 -0
- package/toolkit/dist/theme/extension/branding-mods.js +65 -0
- package/toolkit/dist/theme/extension/configuration/defaults.js +32 -0
- package/toolkit/dist/theme/extension/configuration/formily.js +170 -0
- package/toolkit/dist/theme/extension/configuration/index.js +28 -0
- package/toolkit/dist/theme/extension/configuration/paths.js +7 -0
- package/toolkit/dist/theme/extension/configuration/presets/twentytwentyfive.js +94 -0
- package/toolkit/dist/theme/extension/configuration/resolve.js +98 -0
- package/toolkit/dist/theme/extension/configuration/types.js +3 -0
- package/toolkit/dist/theme/extension/configuration/validate.js +21 -0
- package/toolkit/dist/theme/extension/index.js +38 -0
- package/toolkit/dist/theme/extension/manifest-normalize.js +75 -0
- package/toolkit/dist/theme/extension/presets/twentytwentyfive-appearance.js +193 -0
- package/toolkit/dist/theme/extension/preview.js +92 -0
- package/toolkit/dist/theme/extension/site-notices.js +88 -0
- package/toolkit/dist/theme/extension/site-settings.js +144 -0
- package/toolkit/dist/theme/extension/siteNav.js +17 -0
- package/toolkit/dist/theme/extension/theme-admin-locale.io.js +54 -0
- package/toolkit/dist/theme/extension/theme-admin-locale.js +68 -0
- package/toolkit/dist/theme/extension/theme.js +93 -0
- package/toolkit/dist/theme/extension/twentytwentyfive-vars.js +103 -0
- package/toolkit/dist/theme/fetch.js +241 -0
- package/toolkit/dist/theme/format.js +48 -0
- package/toolkit/dist/theme/httpClient.js +89 -0
- package/toolkit/dist/theme/index.js +226 -0
- package/toolkit/dist/theme/json.js +17 -0
- package/toolkit/dist/theme/jsonp.js +27 -0
- package/toolkit/dist/theme/locale.js +55 -0
- package/toolkit/dist/theme/nav.js +30 -0
- package/toolkit/dist/theme/next-config.js +18 -0
- package/toolkit/dist/theme/node.js +18 -0
- package/toolkit/dist/theme/preview/preview-config.js +65 -0
- package/toolkit/dist/theme/preview/preview-draft.js +51 -0
- package/toolkit/dist/theme/preview/preview-mods.js +78 -0
- package/toolkit/dist/theme/preview-config.js +65 -0
- package/toolkit/dist/theme/preview-draft.js +51 -0
- package/toolkit/dist/theme/preview-mods.js +78 -0
- package/toolkit/dist/theme/providers/index.js +251 -0
- package/toolkit/dist/theme/providers/setup.js +29 -0
- package/toolkit/dist/theme/runtime.js +19 -0
- package/toolkit/dist/theme/seo.js +12 -0
- package/toolkit/dist/theme/server.js +177 -0
- package/toolkit/dist/theme/setting.js +42 -0
- package/toolkit/dist/theme/ssr/bootstrap.js +112 -0
- package/toolkit/dist/theme/ssr/fetch.js +264 -0
- package/toolkit/dist/theme/ssr/format.js +8 -0
- package/toolkit/dist/theme/ssr/pageProps.js +155 -0
- package/toolkit/dist/theme/ssr/setting.js +45 -0
- package/toolkit/dist/theme/ssr/slimBootstrap.js +75 -0
- package/toolkit/dist/theme/ssr/static.js +17 -0
- package/toolkit/dist/theme/ssr/templates.js +50 -0
- package/toolkit/dist/theme/static.js +17 -0
- package/toolkit/dist/theme/templates.js +38 -0
- package/toolkit/dist/theme/ui-optional.js +21 -0
- package/toolkit/dist/theme/visitor/appearance.js +16 -0
- package/toolkit/dist/theme/visitor/authSession.js +92 -0
- package/toolkit/dist/theme/visitor/colorMode.js +59 -0
- package/toolkit/dist/theme/visitor/commentAuthor.js +45 -0
- package/toolkit/dist/theme/visitor/i18n.js +28 -0
- package/toolkit/dist/theme/visitor/locale.js +72 -0
- package/toolkit/dist/theme/visitor/runtime.js +19 -0
- package/toolkit/dist/theme/visitor/visitorLocale.js +56 -0
- package/toolkit/dist/theme/visitorLocale.js +39 -0
- package/toolkit/dist/types/index.js +12 -0
- package/toolkit/dist/ui/AntdStyleTransitionFix.js +16 -0
- package/toolkit/dist/ui/ArchiveEmptyState.js +8 -0
- package/toolkit/dist/ui/ArchivePageLayout.js +8 -0
- package/toolkit/dist/ui/ArticleCard.js +16 -0
- package/toolkit/dist/ui/ArticleList.js +16 -0
- package/toolkit/dist/ui/BaseGlobalStyles.js +18 -0
- package/toolkit/dist/ui/LocaleSwitcher.js +15 -0
- package/toolkit/dist/ui/NavMenu.js +8 -0
- package/toolkit/dist/ui/NotFoundPanel.js +8 -0
- package/toolkit/dist/ui/PageHeader.js +8 -0
- package/toolkit/dist/ui/SiteBranding.js +14 -0
- package/toolkit/dist/ui/SiteDocument.js +13 -0
- package/toolkit/dist/ui/SiteDocumentFallback.js +9 -0
- package/toolkit/dist/ui/SiteLogo.js +16 -0
- package/toolkit/dist/ui/SiteTagline.js +15 -0
- package/toolkit/dist/ui/TaxonomyList.js +30 -0
- package/toolkit/dist/ui/ThemeCssVars.js +85 -0
- package/toolkit/dist/ui/ThemeLayout.js +11 -0
- package/toolkit/dist/ui/components/AntdStyleTransitionFix.js +16 -0
- package/toolkit/dist/ui/components/ArchiveEmptyState.js +8 -0
- package/toolkit/dist/ui/components/ArchivePageLayout.js +8 -0
- package/toolkit/dist/ui/components/ArticleCard.js +16 -0
- package/toolkit/dist/ui/components/ArticleList.js +16 -0
- package/toolkit/dist/ui/components/BaseGlobalStyles.js +18 -0
- package/toolkit/dist/ui/components/LocaleSwitcher.js +11 -0
- package/toolkit/dist/ui/components/NavMenu.js +8 -0
- package/toolkit/dist/ui/components/NotFoundPanel.js +8 -0
- package/toolkit/dist/ui/components/PageHeader.js +8 -0
- package/toolkit/dist/ui/components/RouteProgress.js +40 -0
- package/toolkit/dist/ui/components/SiteAnalytics.js +42 -0
- package/toolkit/dist/ui/components/SiteBranding.js +14 -0
- package/toolkit/dist/ui/components/SiteDocument.js +13 -0
- package/toolkit/dist/ui/components/SiteDocumentFallback.js +9 -0
- package/toolkit/dist/ui/components/SiteLogo.js +23 -0
- package/toolkit/dist/ui/components/SiteSeo.js +19 -0
- package/toolkit/dist/ui/components/SiteTagline.js +15 -0
- package/toolkit/dist/ui/components/TaxonomyList.js +30 -0
- package/toolkit/dist/ui/components/ThemeCssVars.js +85 -0
- package/toolkit/dist/ui/components/ThemeLayout.js +11 -0
- package/toolkit/dist/ui/components/content/ArticleReader.js +23 -0
- package/toolkit/dist/ui/components/content/ArticleToc.js +75 -0
- package/toolkit/dist/ui/components/content/HtmlContent.js +237 -0
- package/toolkit/dist/ui/components/content/Image.js +13 -0
- package/toolkit/dist/ui/components/content/ImageViewer.js +33 -0
- package/toolkit/dist/ui/components/content/LocaleTime.js +63 -0
- package/toolkit/dist/ui/components/content/index.js +18 -0
- package/toolkit/dist/ui/components/toolbar/LocaleToggleButton.js +18 -0
- package/toolkit/dist/ui/components/toolbar/ThemeToggleButton.js +10 -0
- package/toolkit/dist/ui/components/toolbar/ToolbarIconButton.js +22 -0
- package/toolkit/dist/ui/components/toolbar/constants.js +8 -0
- package/toolkit/dist/ui/components/toolbar/icons.js +44 -0
- package/toolkit/dist/ui/components/toolbar/index.js +25 -0
- package/toolkit/dist/ui/components/toolbar/locale-label.js +19 -0
- package/toolkit/dist/ui/context/LocaleContext.js +59 -0
- package/toolkit/dist/ui/context/ReactPressProvider.js +10 -0
- package/toolkit/dist/ui/context/SiteCatalogContext.js +60 -0
- package/toolkit/dist/ui/context/ThemeRuntimeContext.js +59 -0
- package/toolkit/dist/ui/context/index.js +26 -0
- package/toolkit/dist/ui/context/siteCatalogTypes.js +20 -0
- package/toolkit/dist/ui/context/types.js +2 -0
- package/toolkit/dist/ui/hooks/index.js +29 -0
- package/toolkit/dist/ui/hooks/useAsyncLoading.js +31 -0
- package/toolkit/dist/ui/hooks/useForceUpdate.js +11 -0
- package/toolkit/dist/ui/hooks/useNavActive.js +11 -0
- package/toolkit/dist/ui/hooks/usePagination.js +55 -0
- package/toolkit/dist/ui/hooks/useReportArticleView.js +40 -0
- package/toolkit/dist/ui/hooks/useReportPageView.js +28 -0
- package/toolkit/dist/ui/hooks/useRouteParam.js +15 -0
- package/toolkit/dist/ui/hooks/useToggle.js +17 -0
- package/toolkit/dist/ui/hooks/useWarningOnExit.js +59 -0
- package/toolkit/dist/ui/index.js +87 -0
- package/toolkit/dist/utils/api-envelope.js +31 -0
- package/toolkit/dist/utils/clipboard.js +24 -0
- package/toolkit/dist/utils/cookie.js +15 -0
- package/toolkit/dist/utils/date.js +45 -0
- package/toolkit/dist/utils/email.js +9 -0
- package/toolkit/dist/utils/error.js +26 -0
- package/toolkit/dist/utils/image.js +34 -0
- package/toolkit/dist/utils/index.js +39 -0
- package/toolkit/dist/utils/json.js +18 -0
- package/toolkit/dist/utils/jsonp.js +27 -0
- package/toolkit/dist/utils/object.js +63 -0
- package/toolkit/dist/utils/setting.js +13 -0
- package/toolkit/dist/utils/string.js +15 -0
- package/toolkit/dist/utils/viewport.js +14 -0
- package/toolkit/package-lock.json +452 -0
- package/toolkit/package.json +108 -0
- package/dist/cli.d.ts +0 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/config.d.ts +0 -8
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/init.d.ts +0 -6
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/restart.d.ts +0 -2
- package/dist/commands/restart.d.ts.map +0 -1
- package/dist/commands/restart.js.map +0 -1
- package/dist/commands/start.d.ts +0 -2
- package/dist/commands/start.d.ts.map +0 -1
- package/dist/commands/start.js.map +0 -1
- package/dist/commands/status.d.ts +0 -2
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/stop.d.ts +0 -5
- package/dist/commands/stop.d.ts.map +0 -1
- package/dist/commands/stop.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/services/config.d.ts +0 -11
- package/dist/services/config.d.ts.map +0 -1
- package/dist/services/config.js.map +0 -1
- package/dist/services/database.d.ts +0 -43
- package/dist/services/database.d.ts.map +0 -1
- package/dist/services/database.js.map +0 -1
- package/dist/services/exec.d.ts +0 -22
- package/dist/services/exec.d.ts.map +0 -1
- package/dist/services/exec.js.map +0 -1
- package/dist/services/init.d.ts +0 -10
- package/dist/services/init.d.ts.map +0 -1
- package/dist/services/init.js.map +0 -1
- package/dist/services/process.d.ts +0 -9
- package/dist/services/process.d.ts.map +0 -1
- package/dist/services/process.js.map +0 -1
- package/dist/services/server-health.d.ts +0 -4
- package/dist/services/server-health.d.ts.map +0 -1
- package/dist/services/server-health.js.map +0 -1
- package/dist/services/server.d.ts +0 -19
- package/dist/services/server.d.ts.map +0 -1
- package/dist/services/server.js.map +0 -1
- package/dist/types/config.d.ts +0 -30
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/config.js.map +0 -1
- package/dist/utils/cli-context.d.ts +0 -4
- package/dist/utils/cli-context.d.ts.map +0 -1
- package/dist/utils/cli-context.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -10
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -17
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/platform.d.ts +0 -8
- package/dist/utils/platform.d.ts.map +0 -1
- package/dist/utils/platform.js.map +0 -1
- package/dist/utils/port.d.ts +0 -5
- package/dist/utils/port.d.ts.map +0 -1
- package/dist/utils/port.js.map +0 -1
- package/dist/utils/server-bundle.d.ts +0 -11
- package/dist/utils/server-bundle.d.ts.map +0 -1
- package/dist/utils/server-bundle.js.map +0 -1
- package/out/bin/reactpress-cli-shim.d.ts +0 -3
- package/out/bin/reactpress-cli-shim.d.ts.map +0 -1
- package/out/bin/reactpress-cli-shim.js.map +0 -1
- package/out/bin/reactpress-theme-client.d.ts +0 -3
- package/out/bin/reactpress-theme-client.d.ts.map +0 -1
- package/out/bin/reactpress-theme-client.js.map +0 -1
- package/out/bin/reactpress.d.ts +0 -3
- package/out/bin/reactpress.d.ts.map +0 -1
- package/out/bin/reactpress.js.map +0 -1
- package/out/core/services/config.d.ts +0 -12
- package/out/core/services/config.d.ts.map +0 -1
- package/out/core/services/config.js.map +0 -1
- package/out/core/services/database/index.d.ts +0 -17
- package/out/core/services/database/index.d.ts.map +0 -1
- package/out/core/services/database/index.js.map +0 -1
- package/out/core/services/database/mysql.d.ts +0 -14
- package/out/core/services/database/mysql.d.ts.map +0 -1
- package/out/core/services/database/mysql.js.map +0 -1
- package/out/core/services/database/profile.d.ts +0 -6
- package/out/core/services/database/profile.d.ts.map +0 -1
- package/out/core/services/database/profile.js.map +0 -1
- package/out/core/services/database/sqlite.d.ts +0 -10
- package/out/core/services/database/sqlite.d.ts.map +0 -1
- package/out/core/services/database/sqlite.js.map +0 -1
- package/out/core/services/exec.d.ts +0 -21
- package/out/core/services/exec.d.ts.map +0 -1
- package/out/core/services/exec.js.map +0 -1
- package/out/core/services/init.d.ts +0 -11
- package/out/core/services/init.d.ts.map +0 -1
- package/out/core/services/init.js.map +0 -1
- package/out/core/services/local-site.d.ts +0 -24
- package/out/core/services/local-site.d.ts.map +0 -1
- package/out/core/services/local-site.js.map +0 -1
- package/out/core/utils/cli-context.d.ts +0 -3
- package/out/core/utils/cli-context.d.ts.map +0 -1
- package/out/core/utils/cli-context.js.map +0 -1
- package/out/core/utils/paths.d.ts +0 -20
- package/out/core/utils/paths.d.ts.map +0 -1
- package/out/core/utils/paths.js.map +0 -1
- package/out/core/utils/platform.d.ts +0 -7
- package/out/core/utils/platform.d.ts.map +0 -1
- package/out/core/utils/platform.js.map +0 -1
- package/out/core/utils/port.d.ts +0 -4
- package/out/core/utils/port.d.ts.map +0 -1
- package/out/core/utils/port.js.map +0 -1
- package/out/lib/api-dev-runner.d.ts +0 -3
- package/out/lib/api-dev-runner.d.ts.map +0 -1
- package/out/lib/api-dev-runner.js.map +0 -1
- package/out/lib/api-dev.d.ts +0 -2
- package/out/lib/api-dev.d.ts.map +0 -1
- package/out/lib/api-dev.js.map +0 -1
- package/out/lib/bootstrap.d.ts +0 -18
- package/out/lib/bootstrap.d.ts.map +0 -1
- package/out/lib/bootstrap.js.map +0 -1
- package/out/lib/build.d.ts +0 -2
- package/out/lib/build.d.ts.map +0 -1
- package/out/lib/build.js.map +0 -1
- package/out/lib/db-backup.d.ts +0 -2
- package/out/lib/db-backup.d.ts.map +0 -1
- package/out/lib/db-backup.js.map +0 -1
- package/out/lib/dev-banner.d.ts +0 -2
- package/out/lib/dev-banner.d.ts.map +0 -1
- package/out/lib/dev-banner.js.map +0 -1
- package/out/lib/dev-child-io.d.ts +0 -2
- package/out/lib/dev-child-io.d.ts.map +0 -1
- package/out/lib/dev-child-io.js.map +0 -1
- package/out/lib/dev-log.d.ts +0 -2
- package/out/lib/dev-log.d.ts.map +0 -1
- package/out/lib/dev-log.js.map +0 -1
- package/out/lib/dev-session.d.ts +0 -2
- package/out/lib/dev-session.d.ts.map +0 -1
- package/out/lib/dev-session.js.map +0 -1
- package/out/lib/dev.d.ts +0 -2
- package/out/lib/dev.d.ts.map +0 -1
- package/out/lib/dev.js.map +0 -1
- package/out/lib/docker.d.ts +0 -2
- package/out/lib/docker.d.ts.map +0 -1
- package/out/lib/docker.js.map +0 -1
- package/out/lib/doctor.d.ts +0 -2
- package/out/lib/doctor.d.ts.map +0 -1
- package/out/lib/doctor.js.map +0 -1
- package/out/lib/health-parse.d.ts +0 -5
- package/out/lib/health-parse.d.ts.map +0 -1
- package/out/lib/health-parse.js.map +0 -1
- package/out/lib/health-parse.test.d.ts +0 -2
- package/out/lib/health-parse.test.d.ts.map +0 -1
- package/out/lib/health-parse.test.js.map +0 -1
- package/out/lib/http.d.ts +0 -2
- package/out/lib/http.d.ts.map +0 -1
- package/out/lib/http.js.map +0 -1
- package/out/lib/i18n/index.d.ts +0 -2
- package/out/lib/i18n/index.d.ts.map +0 -1
- package/out/lib/i18n/index.js.map +0 -1
- package/out/lib/i18n/strings.d.ts +0 -2
- package/out/lib/i18n/strings.d.ts.map +0 -1
- package/out/lib/i18n/strings.js.map +0 -1
- package/out/lib/lifecycle.d.ts +0 -2
- package/out/lib/lifecycle.d.ts.map +0 -1
- package/out/lib/lifecycle.js.map +0 -1
- package/out/lib/nginx.d.ts +0 -2
- package/out/lib/nginx.d.ts.map +0 -1
- package/out/lib/nginx.js.map +0 -1
- package/out/lib/paths.d.ts +0 -2
- package/out/lib/paths.d.ts.map +0 -1
- package/out/lib/paths.js.map +0 -1
- package/out/lib/plugin-build.d.ts +0 -2
- package/out/lib/plugin-build.d.ts.map +0 -1
- package/out/lib/plugin-build.js.map +0 -1
- package/out/lib/plugin-cli.d.ts +0 -2
- package/out/lib/plugin-cli.d.ts.map +0 -1
- package/out/lib/plugin-cli.js.map +0 -1
- package/out/lib/pm2.d.ts +0 -2
- package/out/lib/pm2.d.ts.map +0 -1
- package/out/lib/pm2.js.map +0 -1
- package/out/lib/ports.d.ts +0 -2
- package/out/lib/ports.d.ts.map +0 -1
- package/out/lib/ports.js.map +0 -1
- package/out/lib/process.d.ts +0 -2
- package/out/lib/process.d.ts.map +0 -1
- package/out/lib/process.js.map +0 -1
- package/out/lib/prod-memory.d.ts +0 -6
- package/out/lib/prod-memory.d.ts.map +0 -1
- package/out/lib/prod-memory.js.map +0 -1
- package/out/lib/project-type.d.ts +0 -2
- package/out/lib/project-type.d.ts.map +0 -1
- package/out/lib/project-type.js.map +0 -1
- package/out/lib/publish.d.ts +0 -3
- package/out/lib/publish.d.ts.map +0 -1
- package/out/lib/publish.js.map +0 -1
- package/out/lib/remote-dev.d.ts +0 -2
- package/out/lib/remote-dev.d.ts.map +0 -1
- package/out/lib/remote-dev.js.map +0 -1
- package/out/lib/root.d.ts +0 -2
- package/out/lib/root.d.ts.map +0 -1
- package/out/lib/root.js.map +0 -1
- package/out/lib/spawn.d.ts +0 -2
- package/out/lib/spawn.d.ts.map +0 -1
- package/out/lib/spawn.js.map +0 -1
- package/out/lib/status.d.ts +0 -2
- package/out/lib/status.d.ts.map +0 -1
- package/out/lib/status.js.map +0 -1
- package/out/lib/theme-catalog.d.ts +0 -2
- package/out/lib/theme-catalog.d.ts.map +0 -1
- package/out/lib/theme-catalog.js.map +0 -1
- package/out/lib/theme-cli.d.ts +0 -2
- package/out/lib/theme-cli.d.ts.map +0 -1
- package/out/lib/theme-cli.js.map +0 -1
- package/out/lib/theme-dev.d.ts +0 -2
- package/out/lib/theme-dev.d.ts.map +0 -1
- package/out/lib/theme-dev.js.map +0 -1
- package/out/lib/theme-env.d.ts +0 -2
- package/out/lib/theme-env.d.ts.map +0 -1
- package/out/lib/theme-env.js.map +0 -1
- package/out/lib/theme-install.d.ts +0 -2
- package/out/lib/theme-install.d.ts.map +0 -1
- package/out/lib/theme-install.js.map +0 -1
- package/out/lib/theme-lock.d.ts +0 -2
- package/out/lib/theme-lock.d.ts.map +0 -1
- package/out/lib/theme-lock.js.map +0 -1
- package/out/lib/theme-paths.d.ts +0 -2
- package/out/lib/theme-paths.d.ts.map +0 -1
- package/out/lib/theme-paths.js.map +0 -1
- package/out/lib/theme-placeholder-cover.d.ts +0 -13
- package/out/lib/theme-placeholder-cover.d.ts.map +0 -1
- package/out/lib/theme-placeholder-cover.js.map +0 -1
- package/out/lib/theme-preview-frame.d.ts +0 -2
- package/out/lib/theme-preview-frame.d.ts.map +0 -1
- package/out/lib/theme-preview-frame.js.map +0 -1
- package/out/lib/theme-preview-pool.d.ts +0 -2
- package/out/lib/theme-preview-pool.d.ts.map +0 -1
- package/out/lib/theme-preview-pool.js.map +0 -1
- package/out/lib/theme-preview-proxy.d.ts +0 -2
- package/out/lib/theme-preview-proxy.d.ts.map +0 -1
- package/out/lib/theme-preview-proxy.js.map +0 -1
- package/out/lib/theme-prod.d.ts +0 -2
- package/out/lib/theme-prod.d.ts.map +0 -1
- package/out/lib/theme-prod.js.map +0 -1
- package/out/lib/theme-registry.d.ts +0 -2
- package/out/lib/theme-registry.d.ts.map +0 -1
- package/out/lib/theme-registry.js.map +0 -1
- package/out/lib/theme-runtime.d.ts +0 -2
- package/out/lib/theme-runtime.d.ts.map +0 -1
- package/out/lib/theme-runtime.js.map +0 -1
- package/out/lib/theme-sources.d.ts +0 -2
- package/out/lib/theme-sources.d.ts.map +0 -1
- package/out/lib/theme-sources.js.map +0 -1
- package/out/lib/theme-warmup.d.ts +0 -2
- package/out/lib/theme-warmup.d.ts.map +0 -1
- package/out/lib/theme-warmup.js.map +0 -1
- package/out/lib/toolkit-build.d.ts +0 -2
- package/out/lib/toolkit-build.d.ts.map +0 -1
- package/out/lib/toolkit-build.js.map +0 -1
- package/out/types/config.d.ts +0 -57
- package/out/types/config.d.ts.map +0 -1
- package/out/types/config.js.map +0 -1
- package/out/ui/banner.d.ts +0 -2
- package/out/ui/banner.d.ts.map +0 -1
- package/out/ui/banner.js.map +0 -1
- package/out/ui/interactive.d.ts +0 -2
- package/out/ui/interactive.d.ts.map +0 -1
- package/out/ui/interactive.js.map +0 -1
- package/out/ui/prompts.d.ts +0 -2
- package/out/ui/prompts.d.ts.map +0 -1
- package/out/ui/prompts.js.map +0 -1
- package/out/ui/theme.d.ts +0 -2
- package/out/ui/theme.d.ts.map +0 -1
- package/out/ui/theme.js.map +0 -1
- package/server/dist/app.module.d.ts +0 -2
- package/server/dist/app.module.js.map +0 -1
- package/server/dist/common/api-messages.d.ts +0 -41
- package/server/dist/common/api-messages.js.map +0 -1
- package/server/dist/database/typeorm-options.d.ts +0 -3
- package/server/dist/database/typeorm-options.js.map +0 -1
- package/server/dist/filters/http-exception.filter.d.ts +0 -4
- package/server/dist/filters/http-exception.filter.js.map +0 -1
- package/server/dist/generate-swagger.d.ts +0 -1
- package/server/dist/generate-swagger.js.map +0 -1
- package/server/dist/interceptors/transform.interceptor.d.ts +0 -9
- package/server/dist/interceptors/transform.interceptor.js.map +0 -1
- package/server/dist/logger/index.d.ts +0 -4
- package/server/dist/logger/index.js.map +0 -1
- package/server/dist/main.d.ts +0 -6
- package/server/dist/main.js.map +0 -1
- package/server/dist/modules/api-key/api-key.controller.d.ts +0 -14
- package/server/dist/modules/api-key/api-key.controller.js.map +0 -1
- package/server/dist/modules/api-key/api-key.entity.d.ts +0 -11
- package/server/dist/modules/api-key/api-key.entity.js.map +0 -1
- package/server/dist/modules/api-key/api-key.guard.d.ts +0 -7
- package/server/dist/modules/api-key/api-key.guard.js.map +0 -1
- package/server/dist/modules/api-key/api-key.module.d.ts +0 -2
- package/server/dist/modules/api-key/api-key.module.js.map +0 -1
- package/server/dist/modules/api-key/api-key.service.d.ts +0 -15
- package/server/dist/modules/api-key/api-key.service.js.map +0 -1
- package/server/dist/modules/article/article-revision.entity.d.ts +0 -11
- package/server/dist/modules/article/article-revision.entity.js.map +0 -1
- package/server/dist/modules/article/article-slug.util.d.ts +0 -2
- package/server/dist/modules/article/article-slug.util.js.map +0 -1
- package/server/dist/modules/article/article.controller.d.ts +0 -27
- package/server/dist/modules/article/article.controller.js.map +0 -1
- package/server/dist/modules/article/article.entity.d.ts +0 -23
- package/server/dist/modules/article/article.entity.js.map +0 -1
- package/server/dist/modules/article/article.module.d.ts +0 -2
- package/server/dist/modules/article/article.module.js.map +0 -1
- package/server/dist/modules/article/article.service.d.ts +0 -30
- package/server/dist/modules/article/article.service.js.map +0 -1
- package/server/dist/modules/article/article.util.d.ts +0 -1
- package/server/dist/modules/article/article.util.js.map +0 -1
- package/server/dist/modules/article/scheduled-publish.service.d.ts +0 -13
- package/server/dist/modules/article/scheduled-publish.service.js.map +0 -1
- package/server/dist/modules/auth/auth.controller.d.ts +0 -12
- package/server/dist/modules/auth/auth.controller.js.map +0 -1
- package/server/dist/modules/auth/auth.module.d.ts +0 -2
- package/server/dist/modules/auth/auth.module.js.map +0 -1
- package/server/dist/modules/auth/auth.service.d.ts +0 -26
- package/server/dist/modules/auth/auth.service.js.map +0 -1
- package/server/dist/modules/auth/jwt-auth.guard.d.ts +0 -7
- package/server/dist/modules/auth/jwt-auth.guard.js.map +0 -1
- package/server/dist/modules/auth/jwt.strategy.d.ts +0 -9
- package/server/dist/modules/auth/jwt.strategy.js.map +0 -1
- package/server/dist/modules/auth/roles.guard.d.ts +0 -10
- package/server/dist/modules/auth/roles.guard.js.map +0 -1
- package/server/dist/modules/bootstrap/bootstrap.constants.d.ts +0 -20
- package/server/dist/modules/bootstrap/bootstrap.constants.js.map +0 -1
- package/server/dist/modules/bootstrap/bootstrap.service.d.ts +0 -22
- package/server/dist/modules/bootstrap/bootstrap.service.js.map +0 -1
- package/server/dist/modules/bootstrap/install-locale.d.ts +0 -2
- package/server/dist/modules/bootstrap/install-locale.js.map +0 -1
- package/server/dist/modules/category/category.controller.d.ts +0 -11
- package/server/dist/modules/category/category.controller.js.map +0 -1
- package/server/dist/modules/category/category.entity.d.ts +0 -9
- package/server/dist/modules/category/category.entity.js.map +0 -1
- package/server/dist/modules/category/category.module.d.ts +0 -2
- package/server/dist/modules/category/category.module.js.map +0 -1
- package/server/dist/modules/category/category.service.d.ts +0 -12
- package/server/dist/modules/category/category.service.js.map +0 -1
- package/server/dist/modules/comment/comment.controller.d.ts +0 -12
- package/server/dist/modules/comment/comment.controller.js.map +0 -1
- package/server/dist/modules/comment/comment.entity.d.ts +0 -17
- package/server/dist/modules/comment/comment.entity.js.map +0 -1
- package/server/dist/modules/comment/comment.module.d.ts +0 -2
- package/server/dist/modules/comment/comment.module.js.map +0 -1
- package/server/dist/modules/comment/comment.service.d.ts +0 -24
- package/server/dist/modules/comment/comment.service.js.map +0 -1
- package/server/dist/modules/comment/html.d.ts +0 -15
- package/server/dist/modules/comment/html.js.map +0 -1
- package/server/dist/modules/extension/extension.module.d.ts +0 -9
- package/server/dist/modules/extension/extension.module.js.map +0 -1
- package/server/dist/modules/extension/plugin-loader.service.d.ts +0 -12
- package/server/dist/modules/extension/plugin-loader.service.js.map +0 -1
- package/server/dist/modules/extension/plugin-registry.bridge.d.ts +0 -3
- package/server/dist/modules/extension/plugin-registry.bridge.js.map +0 -1
- package/server/dist/modules/extension/plugin.controller.d.ts +0 -22
- package/server/dist/modules/extension/plugin.controller.js.map +0 -1
- package/server/dist/modules/extension/plugin.service.d.ts +0 -52
- package/server/dist/modules/extension/plugin.service.js.map +0 -1
- package/server/dist/modules/extension/preview-draft.store.d.ts +0 -13
- package/server/dist/modules/extension/preview-draft.store.js.map +0 -1
- package/server/dist/modules/extension/theme-registry.bridge.d.ts +0 -56
- package/server/dist/modules/extension/theme-registry.bridge.js.map +0 -1
- package/server/dist/modules/extension/theme.controller.d.ts +0 -66
- package/server/dist/modules/extension/theme.controller.js.map +0 -1
- package/server/dist/modules/extension/theme.service.d.ts +0 -140
- package/server/dist/modules/extension/theme.service.js.map +0 -1
- package/server/dist/modules/file/file-optimization.controller.d.ts +0 -12
- package/server/dist/modules/file/file-optimization.controller.js.map +0 -1
- package/server/dist/modules/file/file-optimization.service.d.ts +0 -36
- package/server/dist/modules/file/file-optimization.service.js.map +0 -1
- package/server/dist/modules/file/file-optimization.types.d.ts +0 -66
- package/server/dist/modules/file/file-optimization.types.js.map +0 -1
- package/server/dist/modules/file/file.controller.d.ts +0 -10
- package/server/dist/modules/file/file.controller.js.map +0 -1
- package/server/dist/modules/file/file.entity.d.ts +0 -9
- package/server/dist/modules/file/file.entity.js.map +0 -1
- package/server/dist/modules/file/file.module.d.ts +0 -2
- package/server/dist/modules/file/file.module.js.map +0 -1
- package/server/dist/modules/file/file.service.d.ts +0 -17
- package/server/dist/modules/file/file.service.js.map +0 -1
- package/server/dist/modules/file/image-optimizer-plugin.guard.d.ts +0 -7
- package/server/dist/modules/file/image-optimizer-plugin.guard.js.map +0 -1
- package/server/dist/modules/health/health.controller.d.ts +0 -11
- package/server/dist/modules/health/health.controller.js.map +0 -1
- package/server/dist/modules/health/health.module.d.ts +0 -2
- package/server/dist/modules/health/health.module.js.map +0 -1
- package/server/dist/modules/hook/hook.module.d.ts +0 -2
- package/server/dist/modules/hook/hook.module.js.map +0 -1
- package/server/dist/modules/hook/hook.service.d.ts +0 -26
- package/server/dist/modules/hook/hook.service.js.map +0 -1
- package/server/dist/modules/install/install.controller.d.ts +0 -11
- package/server/dist/modules/install/install.controller.js.map +0 -1
- package/server/dist/modules/install/install.module.d.ts +0 -2
- package/server/dist/modules/install/install.module.js.map +0 -1
- package/server/dist/modules/install/install.service.d.ts +0 -12
- package/server/dist/modules/install/install.service.js.map +0 -1
- package/server/dist/modules/knowledge/knowledge.controller.d.ts +0 -14
- package/server/dist/modules/knowledge/knowledge.controller.js.map +0 -1
- package/server/dist/modules/knowledge/knowledge.entity.d.ts +0 -18
- package/server/dist/modules/knowledge/knowledge.entity.js.map +0 -1
- package/server/dist/modules/knowledge/knowledge.module.d.ts +0 -2
- package/server/dist/modules/knowledge/knowledge.module.js.map +0 -1
- package/server/dist/modules/knowledge/knowledge.service.d.ts +0 -14
- package/server/dist/modules/knowledge/knowledge.service.js.map +0 -1
- package/server/dist/modules/page/page.controller.d.ts +0 -12
- package/server/dist/modules/page/page.controller.js.map +0 -1
- package/server/dist/modules/page/page.entity.d.ts +0 -15
- package/server/dist/modules/page/page.entity.js.map +0 -1
- package/server/dist/modules/page/page.module.d.ts +0 -2
- package/server/dist/modules/page/page.module.js.map +0 -1
- package/server/dist/modules/page/page.service.d.ts +0 -12
- package/server/dist/modules/page/page.service.js.map +0 -1
- package/server/dist/modules/search/search.controller.d.ts +0 -8
- package/server/dist/modules/search/search.controller.js.map +0 -1
- package/server/dist/modules/search/search.entity.d.ts +0 -8
- package/server/dist/modules/search/search.entity.js.map +0 -1
- package/server/dist/modules/search/search.module.d.ts +0 -2
- package/server/dist/modules/search/search.module.js.map +0 -1
- package/server/dist/modules/search/search.service.d.ts +0 -12
- package/server/dist/modules/search/search.service.js.map +0 -1
- package/server/dist/modules/setting/setting.constant.d.ts +0 -3
- package/server/dist/modules/setting/setting.constant.js.map +0 -1
- package/server/dist/modules/setting/setting.controller.d.ts +0 -12
- package/server/dist/modules/setting/setting.controller.js.map +0 -1
- package/server/dist/modules/setting/setting.entity.d.ts +0 -26
- package/server/dist/modules/setting/setting.entity.js.map +0 -1
- package/server/dist/modules/setting/setting.module.d.ts +0 -2
- package/server/dist/modules/setting/setting.module.js.map +0 -1
- package/server/dist/modules/setting/setting.service.d.ts +0 -10
- package/server/dist/modules/setting/setting.service.js.map +0 -1
- package/server/dist/modules/smtp/mail.util.d.ts +0 -6
- package/server/dist/modules/smtp/mail.util.js.map +0 -1
- package/server/dist/modules/smtp/smtp.controller.d.ts +0 -9
- package/server/dist/modules/smtp/smtp.controller.js.map +0 -1
- package/server/dist/modules/smtp/smtp.entity.d.ts +0 -9
- package/server/dist/modules/smtp/smtp.entity.js.map +0 -1
- package/server/dist/modules/smtp/smtp.module.d.ts +0 -2
- package/server/dist/modules/smtp/smtp.module.js.map +0 -1
- package/server/dist/modules/smtp/smtp.service.d.ts +0 -11
- package/server/dist/modules/smtp/smtp.service.js.map +0 -1
- package/server/dist/modules/tag/tag.controller.d.ts +0 -12
- package/server/dist/modules/tag/tag.controller.js.map +0 -1
- package/server/dist/modules/tag/tag.entity.d.ts +0 -9
- package/server/dist/modules/tag/tag.entity.js.map +0 -1
- package/server/dist/modules/tag/tag.module.d.ts +0 -2
- package/server/dist/modules/tag/tag.module.js.map +0 -1
- package/server/dist/modules/tag/tag.service.d.ts +0 -13
- package/server/dist/modules/tag/tag.service.js.map +0 -1
- package/server/dist/modules/user/user.controller.d.ts +0 -13
- package/server/dist/modules/user/user.controller.js.map +0 -1
- package/server/dist/modules/user/user.entity.d.ts +0 -15
- package/server/dist/modules/user/user.entity.js.map +0 -1
- package/server/dist/modules/user/user.module.d.ts +0 -2
- package/server/dist/modules/user/user.module.js.map +0 -1
- package/server/dist/modules/user/user.service.d.ts +0 -16
- package/server/dist/modules/user/user.service.js.map +0 -1
- package/server/dist/modules/view/view.controller.d.ts +0 -11
- package/server/dist/modules/view/view.controller.js.map +0 -1
- package/server/dist/modules/view/view.entity.d.ts +0 -14
- package/server/dist/modules/view/view.entity.js.map +0 -1
- package/server/dist/modules/view/view.module.d.ts +0 -2
- package/server/dist/modules/view/view.module.js.map +0 -1
- package/server/dist/modules/view/view.service.d.ts +0 -11
- package/server/dist/modules/view/view.service.js.map +0 -1
- package/server/dist/modules/webhook/webhook.controller.d.ts +0 -12
- package/server/dist/modules/webhook/webhook.controller.js.map +0 -1
- package/server/dist/modules/webhook/webhook.entity.d.ts +0 -9
- package/server/dist/modules/webhook/webhook.entity.js.map +0 -1
- package/server/dist/modules/webhook/webhook.module.d.ts +0 -2
- package/server/dist/modules/webhook/webhook.module.js.map +0 -1
- package/server/dist/modules/webhook/webhook.service.d.ts +0 -16
- package/server/dist/modules/webhook/webhook.service.js.map +0 -1
- package/server/dist/node-polyfills.d.ts +0 -18
- package/server/dist/node-polyfills.js.map +0 -1
- package/server/dist/public/apple-touch-icon.png +0 -0
- package/server/dist/public/favicon-16.png +0 -0
- package/server/dist/public/favicon-32.png +0 -0
- package/server/dist/public/favicon-48.png +0 -0
- package/server/dist/public/favicon.ico +0 -0
- package/server/dist/public/favicon.png +0 -0
- package/server/dist/public/icon-192.png +0 -0
- package/server/dist/public/icon-512.png +0 -0
- package/server/dist/public/index.html +0 -439
- package/server/dist/public/logo-200.png +0 -0
- package/server/dist/public/logo-400.png +0 -0
- package/server/dist/public/logo.png +0 -0
- package/server/dist/public/logo.svg +0 -7
- package/server/dist/public/swagger/custom.css +0 -11
- 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/starter.d.ts +0 -1
- package/server/dist/starter.js.map +0 -1
- package/server/dist/tsconfig.build.tsbuildinfo +0 -16764
- package/server/dist/tsconfig.tsbuildinfo +0 -1
- package/server/dist/utils/date.util.d.ts +0 -1
- package/server/dist/utils/date.util.js.map +0 -1
- package/server/dist/utils/html-sanitize.util.d.ts +0 -1
- package/server/dist/utils/html-sanitize.util.js.map +0 -1
- package/server/dist/utils/image-processor.util.d.ts +0 -23
- package/server/dist/utils/image-processor.util.js.map +0 -1
- package/server/dist/utils/ip.util.d.ts +0 -2
- package/server/dist/utils/ip.util.js.map +0 -1
- package/server/dist/utils/local-api-quiet.util.d.ts +0 -1
- package/server/dist/utils/local-api-quiet.util.js.map +0 -1
- package/server/dist/utils/markdown.util.d.ts +0 -4
- package/server/dist/utils/markdown.util.js.map +0 -1
- package/server/dist/utils/oss/aliyun-oss-client.d.ts +0 -6
- package/server/dist/utils/oss/aliyun-oss-client.js.map +0 -1
- package/server/dist/utils/oss/oss-client.d.ts +0 -6
- package/server/dist/utils/oss/oss-client.js.map +0 -1
- package/server/dist/utils/oss.util.d.ts +0 -13
- package/server/dist/utils/oss.util.js.map +0 -1
- package/server/dist/utils/project-root.util.d.ts +0 -2
- package/server/dist/utils/project-root.util.js.map +0 -1
- package/server/dist/utils/query-whitelist.util.d.ts +0 -1
- package/server/dist/utils/query-whitelist.util.js.map +0 -1
- package/server/dist/utils/ua.util.d.ts +0 -9
- package/server/dist/utils/ua.util.js.map +0 -1
- package/server/dist/utils/uniqueid.util.d.ts +0 -1
- package/server/dist/utils/uniqueid.util.js.map +0 -1
- package/server/dist/utils/upload.util.d.ts +0 -5
- package/server/dist/utils/upload.util.js.map +0 -1
- package/server/dist/utils/user.util.d.ts +0 -1
- package/server/dist/utils/user.util.js.map +0 -1
- package/server/logs/error/error.log.-2026-05-19.log +0 -135
- package/server/logs/request/request.log.-2026-05-19.log +0 -0
- package/server/logs/response/response.log.-2026-05-19.log +0 -121
- 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/out/ui/banner.js
CHANGED
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
const os = require('os');
|
|
5
|
-
const path = require('path');
|
|
6
5
|
const chalk = require('chalk');
|
|
7
|
-
const { brand, icon, palette, visibleLength, padRight,
|
|
6
|
+
const { brand, icon, palette, visibleLength, padRight, gradientText, macTrafficLights, systemStatusBadge, statusPill, pulseBar, } = require('./theme');
|
|
8
7
|
const { t } = require('../lib/i18n');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Each row is exactly 81 single-cell columns, so we can size the surrounding
|
|
12
|
-
* cyber-card deterministically without measuring per-glyph widths.
|
|
13
|
-
*/
|
|
8
|
+
const { getCliVersion } = require('../lib/paths');
|
|
9
|
+
/** Full ANSI Shadow logo — 81 cells wide. */
|
|
14
10
|
const TECH_LOGO = [
|
|
15
11
|
'██████╗ ███████╗ █████╗ ██████╗████████╗██████╗ ██████╗ ███████╗███████╗███████╗',
|
|
16
12
|
'██╔══██╗██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██╔════╝██╔════╝',
|
|
@@ -19,7 +15,7 @@ const TECH_LOGO = [
|
|
|
19
15
|
'██║ ██║███████╗██║ ██║╚██████╗ ██║ ██║ ██║ ██║███████╗███████║███████║',
|
|
20
16
|
'╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝',
|
|
21
17
|
];
|
|
22
|
-
const LOGO_WIDTH =
|
|
18
|
+
const LOGO_WIDTH = TECH_LOGO[0].length;
|
|
23
19
|
const LOGO_GRADIENTS = [
|
|
24
20
|
[palette.pink, palette.primary],
|
|
25
21
|
[palette.pink, palette.primary],
|
|
@@ -29,19 +25,9 @@ const LOGO_GRADIENTS = [
|
|
|
29
25
|
[palette.accent, palette.primary],
|
|
30
26
|
];
|
|
31
27
|
const REPO_URL = 'https://github.com/fecommunity/reactpress';
|
|
32
|
-
/**
|
|
33
|
-
* Shorter, human-friendly form of REPO_URL shown beneath the title bar.
|
|
34
|
-
* The clickable hyperlink still resolves to the full https:// URL via
|
|
35
|
-
* `hyperlink()`, so users can `cmd+click` from any modern terminal.
|
|
36
|
-
*/
|
|
37
28
|
const REPO_DISPLAY = 'github.com/fecommunity/reactpress';
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* Warp, WezTerm, modern macOS Terminal, VS Code, GNOME Terminal, Kitty, …)
|
|
41
|
-
* render the label as a clickable link. We only emit the escape sequence when
|
|
42
|
-
* stdout is a real TTY — otherwise (CI logs, file redirects, dumb terminals)
|
|
43
|
-
* we fall back to the plain styled label so users never see the raw `]8;;`.
|
|
44
|
-
*/
|
|
29
|
+
const CARD_MIN = 68;
|
|
30
|
+
const ASCII_CARD_PAD = 8;
|
|
45
31
|
function hyperlink(url, label) {
|
|
46
32
|
if (!process.stdout.isTTY)
|
|
47
33
|
return label;
|
|
@@ -49,310 +35,451 @@ function hyperlink(url, label) {
|
|
|
49
35
|
return label;
|
|
50
36
|
return `\u001B]8;;${url}\u0007${label}\u001B]8;;\u0007`;
|
|
51
37
|
}
|
|
52
|
-
function safeReadCliVersion() {
|
|
53
|
-
try {
|
|
54
|
-
return require(path.join(__dirname, '..', 'package.json')).version;
|
|
55
|
-
}
|
|
56
|
-
catch {
|
|
57
|
-
return 'dev';
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
38
|
function homify(p) {
|
|
61
39
|
if (!p)
|
|
62
40
|
return p;
|
|
63
41
|
const home = os.homedir();
|
|
64
|
-
if (home && p.startsWith(home))
|
|
42
|
+
if (home && p.startsWith(home))
|
|
65
43
|
return '~' + p.slice(home.length);
|
|
66
|
-
}
|
|
67
44
|
return p;
|
|
68
45
|
}
|
|
46
|
+
function truncateText(text, maxLen) {
|
|
47
|
+
const raw = String(text);
|
|
48
|
+
if (visibleLength(raw) <= maxLen)
|
|
49
|
+
return raw;
|
|
50
|
+
if (maxLen <= 3)
|
|
51
|
+
return '…';
|
|
52
|
+
let out = '…';
|
|
53
|
+
for (let i = raw.length - 1; i >= 0; i -= 1) {
|
|
54
|
+
const candidate = '…' + raw.slice(i);
|
|
55
|
+
if (visibleLength(candidate) <= maxLen) {
|
|
56
|
+
out = candidate;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return out;
|
|
61
|
+
}
|
|
62
|
+
function bannerColumns() {
|
|
63
|
+
const raw = Number(process.stdout.columns);
|
|
64
|
+
return raw >= 48 ? raw : 80;
|
|
65
|
+
}
|
|
66
|
+
/** Core dev stack — Docker/Nginx are shown but do not affect the SYSTEM badge. */
|
|
67
|
+
const CORE_SYSTEM_SERVICES = new Set(['sqlite', 'mysql', 'server', 'web']);
|
|
68
|
+
function deriveSystemState(project, status) {
|
|
69
|
+
const type = project && project.type;
|
|
70
|
+
if (type !== 'monorepo' && type !== 'standalone') {
|
|
71
|
+
return 'pending';
|
|
72
|
+
}
|
|
73
|
+
if (!status || !Array.isArray(status.components) || status.components.length === 0) {
|
|
74
|
+
return 'pending';
|
|
75
|
+
}
|
|
76
|
+
const core = status.components.filter((c) => CORE_SYSTEM_SERVICES.has(c.id));
|
|
77
|
+
if (core.length === 0)
|
|
78
|
+
return 'pending';
|
|
79
|
+
const okCount = core.filter((c) => c.ok).length;
|
|
80
|
+
if (okCount === core.length)
|
|
81
|
+
return 'online';
|
|
82
|
+
if (okCount === 0)
|
|
83
|
+
return 'error';
|
|
84
|
+
return 'partial';
|
|
85
|
+
}
|
|
86
|
+
function resolveSystemState(options) {
|
|
87
|
+
if (options && options.systemState)
|
|
88
|
+
return options.systemState;
|
|
89
|
+
if (options && options.status) {
|
|
90
|
+
return deriveSystemState(options.project, options.status);
|
|
91
|
+
}
|
|
92
|
+
const type = options && options.project && options.project.type;
|
|
93
|
+
if (type === 'monorepo' || type === 'standalone')
|
|
94
|
+
return 'pending';
|
|
95
|
+
return 'pending';
|
|
96
|
+
}
|
|
97
|
+
function componentLabel(component) {
|
|
98
|
+
return t(`banner.service.${component.id}`).trim();
|
|
99
|
+
}
|
|
100
|
+
function computeLabelWidth(components) {
|
|
101
|
+
const labels = [
|
|
102
|
+
t('banner.label.mode').trim(),
|
|
103
|
+
t('banner.label.path').trim(),
|
|
104
|
+
...(components || []).map((c) => componentLabel(c)),
|
|
105
|
+
];
|
|
106
|
+
return Math.max(...labels.map((label) => visibleLength(label)), 4);
|
|
107
|
+
}
|
|
108
|
+
function componentStatusPill(component) {
|
|
109
|
+
if (component.ok === 'pending') {
|
|
110
|
+
return statusPill('pending', { pending: t('banner.pulsePending') });
|
|
111
|
+
}
|
|
112
|
+
if (component.id === 'sqlite' || component.id === 'mysql') {
|
|
113
|
+
return statusPill(component.ok, {
|
|
114
|
+
on: t('menu.statusReady'),
|
|
115
|
+
off: t('menu.statusNotReady'),
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (component.id === 'docker') {
|
|
119
|
+
return statusPill(component.ok, {
|
|
120
|
+
on: t('menu.statusYes'),
|
|
121
|
+
off: t('menu.statusNo'),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (component.id === 'nginx') {
|
|
125
|
+
return statusPill(component.ok, {
|
|
126
|
+
on: t('banner.nginxRunning'),
|
|
127
|
+
off: t('banner.nginxStopped'),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return statusPill(component.ok, {
|
|
131
|
+
on: t('menu.statusOn'),
|
|
132
|
+
off: t('menu.statusOff'),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function appendComponentStatusRows(lines, innerWidth, status, lw) {
|
|
136
|
+
if (!status || !Array.isArray(status.components))
|
|
137
|
+
return;
|
|
138
|
+
for (const component of status.components) {
|
|
139
|
+
lines.push(cardRow(infoRow(componentLabel(component), componentStatusPill(component), lw), innerWidth));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function resolveLayout(cols) {
|
|
143
|
+
const showAscii = cols >= LOGO_WIDTH + ASCII_CARD_PAD;
|
|
144
|
+
const width = showAscii
|
|
145
|
+
? Math.min(cols - 2, Math.max(LOGO_WIDTH + ASCII_CARD_PAD, 88))
|
|
146
|
+
: Math.min(Math.max(CARD_MIN, cols - 4), 88);
|
|
147
|
+
return { showAscii, width };
|
|
148
|
+
}
|
|
149
|
+
function centerLine(content, innerWidth) {
|
|
150
|
+
const pad = Math.max(0, Math.floor((innerWidth - visibleLength(content)) / 2));
|
|
151
|
+
return ' '.repeat(pad) + content;
|
|
152
|
+
}
|
|
69
153
|
function renderLogoLines() {
|
|
70
154
|
return TECH_LOGO.map((line, i) => gradientText(line, LOGO_GRADIENTS[i]));
|
|
71
155
|
}
|
|
156
|
+
function mixHexLocal(a, b, t) {
|
|
157
|
+
const parse = (h) => {
|
|
158
|
+
const s = String(h || '#000000').replace('#', '');
|
|
159
|
+
return {
|
|
160
|
+
r: parseInt(s.substring(0, 2), 16),
|
|
161
|
+
g: parseInt(s.substring(2, 4), 16),
|
|
162
|
+
b: parseInt(s.substring(4, 6), 16),
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
const pa = parse(a);
|
|
166
|
+
const pb = parse(b);
|
|
167
|
+
const r = Math.round(pa.r + (pb.r - pa.r) * t);
|
|
168
|
+
const g = Math.round(pa.g + (pb.g - pa.g) * t);
|
|
169
|
+
const bl = Math.round(pa.b + (pb.b - pa.b) * t);
|
|
170
|
+
const pad = (n) => n.toString(16).padStart(2, '0');
|
|
171
|
+
return `#${pad(r)}${pad(g)}${pad(bl)}`;
|
|
172
|
+
}
|
|
173
|
+
/** Animated logo — horizontal light streak sweeps across ASCII art. */
|
|
174
|
+
function renderAnimatedLogoLines(frame = 0, revealRatio = 1) {
|
|
175
|
+
const beamSpeed = 3.6;
|
|
176
|
+
const beamGlow = 16;
|
|
177
|
+
const cycleLen = LOGO_WIDTH + beamGlow * 2;
|
|
178
|
+
const head = (frame * beamSpeed) % cycleLen;
|
|
179
|
+
const trail = (head - beamGlow * 0.75 + cycleLen) % cycleLen;
|
|
180
|
+
const streamHot = '#FFFFFF';
|
|
181
|
+
const streamCore = palette.accent;
|
|
182
|
+
const streamTrail = palette.pink;
|
|
183
|
+
function beamIntensity(col, rowIndex, beamHead) {
|
|
184
|
+
const pos = col + rowIndex * 2.2;
|
|
185
|
+
const raw = Math.abs(pos - beamHead);
|
|
186
|
+
const wrapped = Math.min(raw, cycleLen - raw);
|
|
187
|
+
if (wrapped >= beamGlow)
|
|
188
|
+
return 0;
|
|
189
|
+
const t = 1 - wrapped / beamGlow;
|
|
190
|
+
return t * t;
|
|
191
|
+
}
|
|
192
|
+
function paintChar(ch, ci, rowIndex, colors, lineLen) {
|
|
193
|
+
if (ch === ' ')
|
|
194
|
+
return ch;
|
|
195
|
+
const n = Math.max(lineLen - 1, 1);
|
|
196
|
+
const ratio = ci / n;
|
|
197
|
+
const base = mixHexLocal(colors[0], colors[1] || colors[0], ratio);
|
|
198
|
+
const dimBase = mixHexLocal(base, palette.surface, 0.85);
|
|
199
|
+
const primary = beamIntensity(ci, rowIndex, head);
|
|
200
|
+
const secondary = beamIntensity(ci, rowIndex, trail) * 0.55;
|
|
201
|
+
const glow = Math.min(1, primary + secondary);
|
|
202
|
+
if (glow <= 0.03) {
|
|
203
|
+
return chalk.hex(dimBase)(ch);
|
|
204
|
+
}
|
|
205
|
+
let lit = dimBase;
|
|
206
|
+
if (primary > 0.65) {
|
|
207
|
+
lit = mixHexLocal(streamHot, streamCore, 1 - primary);
|
|
208
|
+
}
|
|
209
|
+
else if (glow > 0.3) {
|
|
210
|
+
lit = mixHexLocal(mixHexLocal(dimBase, streamTrail, 0.15), streamCore, glow);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
lit = mixHexLocal(dimBase, streamTrail, glow * 0.9);
|
|
214
|
+
}
|
|
215
|
+
const c = chalk.hex(lit);
|
|
216
|
+
return glow > 0.45 ? c.bold(ch) : c(ch);
|
|
217
|
+
}
|
|
218
|
+
return TECH_LOGO.map((line, rowIndex) => {
|
|
219
|
+
const rowThreshold = (rowIndex + 1) / TECH_LOGO.length;
|
|
220
|
+
if (revealRatio < rowThreshold - 0.06) {
|
|
221
|
+
const ghost = mixHexLocal(palette.border, palette.surface, 0.5);
|
|
222
|
+
return chalk.hex(ghost)([...line]
|
|
223
|
+
.map((ch) => (ch === ' ' ? ch : '░'))
|
|
224
|
+
.join(''));
|
|
225
|
+
}
|
|
226
|
+
const colors = LOGO_GRADIENTS[rowIndex];
|
|
227
|
+
return [...line]
|
|
228
|
+
.map((ch, ci) => paintChar(ch, ci, rowIndex, colors, line.length))
|
|
229
|
+
.join('');
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function startupPulseRow(innerWidth, { completed = 0, total = 0, ready = false, frame = 0 } = {}) {
|
|
233
|
+
const barWidth = Math.min(24, Math.max(8, innerWidth - 22));
|
|
234
|
+
let filled = 0;
|
|
235
|
+
if (total > 0) {
|
|
236
|
+
filled = Math.round((completed / total) * barWidth);
|
|
237
|
+
if (!ready)
|
|
238
|
+
filled = Math.min(barWidth, filled + (frame % 2));
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
filled = 4 + (frame % Math.max(1, barWidth - 4));
|
|
242
|
+
}
|
|
243
|
+
const label = brand.muted(padRight(t('banner.pulseLabel').trim(), 6));
|
|
244
|
+
const bar = pulseBar(barWidth, filled);
|
|
245
|
+
const status = ready
|
|
246
|
+
? brand.success(t('banner.pulseReady'))
|
|
247
|
+
: brand.warn(t('banner.pulsePending'));
|
|
248
|
+
return centerLine(`${label}${bar} ${status}`, innerWidth);
|
|
249
|
+
}
|
|
250
|
+
function cardTop(width) {
|
|
251
|
+
return brand.border(` ╭${'─'.repeat(width - 2)}╮`);
|
|
252
|
+
}
|
|
253
|
+
function cardBottom(width) {
|
|
254
|
+
return brand.border(` ╰${'─'.repeat(width - 2)}╯`);
|
|
255
|
+
}
|
|
256
|
+
function cardRow(content, innerWidth) {
|
|
257
|
+
const padded = padRight(content, innerWidth);
|
|
258
|
+
return brand.border(' │ ') + padded + brand.border(' │');
|
|
259
|
+
}
|
|
260
|
+
function cardGap(innerWidth) {
|
|
261
|
+
return cardRow('', innerWidth);
|
|
262
|
+
}
|
|
263
|
+
function titleBarRow(innerWidth, version, systemState) {
|
|
264
|
+
const lights = macTrafficLights() + brand.dim(' ');
|
|
265
|
+
const lightsW = visibleLength(lights);
|
|
266
|
+
const title = brand.dim(`reactpress · v${version}`);
|
|
267
|
+
const titleW = visibleLength(title);
|
|
268
|
+
const status = systemStatusBadge(systemState);
|
|
269
|
+
const statusW = visibleLength(status);
|
|
270
|
+
const titleStart = Math.max(lightsW + 1, Math.floor((innerWidth - titleW) / 2));
|
|
271
|
+
const padBeforeTitle = Math.max(0, titleStart - lightsW);
|
|
272
|
+
let line = lights + ' '.repeat(padBeforeTitle) + title;
|
|
273
|
+
const gap = innerWidth - visibleLength(line) - statusW;
|
|
274
|
+
if (gap >= 2) {
|
|
275
|
+
line += ' '.repeat(gap) + status;
|
|
276
|
+
}
|
|
277
|
+
else if (gap >= 0) {
|
|
278
|
+
line += ' '.repeat(gap);
|
|
279
|
+
}
|
|
280
|
+
return padRight(line, innerWidth);
|
|
281
|
+
}
|
|
282
|
+
function repoRow(innerWidth) {
|
|
283
|
+
const link = brand.dim(icon.link + ' ') +
|
|
284
|
+
hyperlink(REPO_URL, brand.dim.underline(REPO_DISPLAY));
|
|
285
|
+
return centerLine(link, innerWidth);
|
|
286
|
+
}
|
|
287
|
+
function headerRows(innerWidth, version, systemState) {
|
|
288
|
+
return [titleBarRow(innerWidth, version, systemState), repoRow(innerWidth)];
|
|
289
|
+
}
|
|
290
|
+
function wordmarkHero() {
|
|
291
|
+
const bars = brand.border('═══');
|
|
292
|
+
const word = gradientText('REACTPRESS', [palette.pink, palette.primary, palette.accent], {
|
|
293
|
+
bold: true,
|
|
294
|
+
});
|
|
295
|
+
return `${bars} ${word} ${bars}`;
|
|
296
|
+
}
|
|
297
|
+
/** Compact wordmark with the same streaming-light sweep. */
|
|
298
|
+
function renderAnimatedWordmark(frame = 0) {
|
|
299
|
+
const text = 'REACTPRESS';
|
|
300
|
+
const beamSpeed = 3.2;
|
|
301
|
+
const beamGlow = 6;
|
|
302
|
+
const cycleLen = text.length + beamGlow * 2;
|
|
303
|
+
const head = (frame * beamSpeed) % cycleLen;
|
|
304
|
+
const streamHot = '#F0FDFF';
|
|
305
|
+
const bars = brand.border('═══');
|
|
306
|
+
const painted = [...text]
|
|
307
|
+
.map((ch, ci) => {
|
|
308
|
+
const raw = Math.abs(ci + 0.5 - head);
|
|
309
|
+
const wrapped = Math.min(raw, cycleLen - raw);
|
|
310
|
+
const glow = wrapped >= beamGlow ? 0 : Math.pow(1 - wrapped / beamGlow, 2);
|
|
311
|
+
const base = mixHexLocal(palette.pink, palette.accent, ci / Math.max(text.length - 1, 1));
|
|
312
|
+
const dimBase = mixHexLocal(base, palette.surface, 0.65);
|
|
313
|
+
if (glow <= 0.05)
|
|
314
|
+
return chalk.hex(dimBase).bold(ch);
|
|
315
|
+
const lit = glow > 0.75
|
|
316
|
+
? mixHexLocal(streamHot, palette.accent, 1 - glow)
|
|
317
|
+
: mixHexLocal(dimBase, palette.accent, glow);
|
|
318
|
+
const c = chalk.hex(lit);
|
|
319
|
+
return glow > 0.5 ? c.bold(ch) : c(ch);
|
|
320
|
+
})
|
|
321
|
+
.join('');
|
|
322
|
+
return `${bars} ${painted} ${bars}`;
|
|
323
|
+
}
|
|
324
|
+
function taglineRow() {
|
|
325
|
+
return `${brand.accent('◇')} ${brand.accent(t('banner.tagline').trim())}`;
|
|
326
|
+
}
|
|
327
|
+
function softRule(innerWidth) {
|
|
328
|
+
const w = Math.min(innerWidth - 4, Math.max(28, innerWidth - 16));
|
|
329
|
+
return centerLine(brand.border('─'.repeat(w)), innerWidth);
|
|
330
|
+
}
|
|
72
331
|
function modeChip(type) {
|
|
73
332
|
if (type === 'monorepo') {
|
|
74
|
-
return chalk
|
|
75
|
-
.bgHex(palette.primary)
|
|
76
|
-
.hex('#0B1220')
|
|
77
|
-
.bold(` ${t('banner.mode.monorepo')} `);
|
|
333
|
+
return chalk.bgHex(palette.primary).hex('#0B1220').bold(` ${t('banner.mode.monorepo').trim()} `);
|
|
78
334
|
}
|
|
79
335
|
if (type === 'standalone') {
|
|
80
|
-
return chalk
|
|
81
|
-
.bgHex(palette.accent)
|
|
82
|
-
.hex('#0B1220')
|
|
83
|
-
.bold(` ${t('banner.mode.standalone')} `);
|
|
84
|
-
}
|
|
85
|
-
return chalk
|
|
86
|
-
.bgHex(palette.gray)
|
|
87
|
-
.hex('#0B1220')
|
|
88
|
-
.bold(` ${t('banner.mode.uninitialized')} `);
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Decide how "ready" the welcome banner should look. When a fully
|
|
92
|
-
* initialized project is detected we render the pulse bar at 100% and
|
|
93
|
-
* report `ONLINE` status, instead of the static 70% placeholder that used
|
|
94
|
-
* to make `doctor` runs look incomplete even when everything passed.
|
|
95
|
-
*/
|
|
96
|
-
function bannerReadyState(options) {
|
|
97
|
-
const type = options && options.project && options.project.type;
|
|
98
|
-
if (type === 'monorepo' || type === 'standalone') {
|
|
99
|
-
return { ratio: 1, ready: true };
|
|
336
|
+
return chalk.bgHex(palette.accent).hex('#0B1220').bold(` ${t('banner.mode.standalone').trim()} `);
|
|
100
337
|
}
|
|
101
|
-
return {
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*/
|
|
107
|
-
function brandedTopBorder(version, width) {
|
|
108
|
-
const titleBlock = brand.primary('[') +
|
|
109
|
-
' ' +
|
|
110
|
-
gradientText('REACTPRESS', [palette.primary, palette.accent], { bold: true }) +
|
|
111
|
-
' ' +
|
|
112
|
-
brand.muted('·') +
|
|
113
|
-
' ' +
|
|
114
|
-
brand.accent(`v${version}`) +
|
|
115
|
-
' ' +
|
|
116
|
-
brand.primary(']');
|
|
117
|
-
const dashTotal = Math.max(0, width - 2 - visibleLength(titleBlock));
|
|
118
|
-
const left = Math.floor(dashTotal / 2);
|
|
119
|
-
const right = dashTotal - left;
|
|
120
|
-
return (brand.primary('╔' + '═'.repeat(left)) +
|
|
121
|
-
titleBlock +
|
|
122
|
-
brand.primary('═'.repeat(right) + '╗'));
|
|
123
|
-
}
|
|
124
|
-
function bottomBorder(width) {
|
|
125
|
-
return brand.primary('╚' + '═'.repeat(width - 2) + '╝');
|
|
126
|
-
}
|
|
127
|
-
function bodyLine(content, innerWidth) {
|
|
128
|
-
const padded = padRight(content, innerWidth);
|
|
129
|
-
return brand.primary('║ ') + padded + brand.primary(' ║');
|
|
130
|
-
}
|
|
131
|
-
function emptyBodyLine(innerWidth) {
|
|
132
|
-
return bodyLine('', innerWidth);
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* A subtle "CRT scan-line" rendered just under the logo.
|
|
136
|
-
* ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
|
|
137
|
-
*/
|
|
138
|
-
function scanline(width) {
|
|
139
|
-
return brand.muted('▔'.repeat(width));
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Width of the left-side banner label column.
|
|
143
|
-
*
|
|
144
|
-
* Sized to fit our longest English label (`MODE` / `PATH` → 4 cells)
|
|
145
|
-
* plus a 2-cell trailing gap, which also accommodates the Chinese
|
|
146
|
-
* translations `模式` / `路径` (4 East-Asian cells each).
|
|
147
|
-
*/
|
|
148
|
-
const LABEL_WIDTH = 6;
|
|
149
|
-
/**
|
|
150
|
-
* Centered, dim repo subtitle that sits directly under the top border.
|
|
151
|
-
* Replaces the previous in-body `◇ REPO ↗ …` row, which competed visually
|
|
152
|
-
* with the operational fields (MODE / PATH / pulse) further down.
|
|
153
|
-
*/
|
|
154
|
-
function repoSubline(innerWidth) {
|
|
155
|
-
const link = brand.muted('↗ ') + hyperlink(REPO_URL, brand.accent.underline(REPO_DISPLAY));
|
|
156
|
-
const pad = Math.max(0, Math.floor((innerWidth - visibleLength(link)) / 2));
|
|
157
|
-
return ' '.repeat(pad) + link;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Single-cell-wide chip label, e.g. `◇ MODE ▸ monorepo`.
|
|
161
|
-
*/
|
|
162
|
-
function infoRow(label, value) {
|
|
163
|
-
return (brand.accent('◇ ') +
|
|
164
|
-
brand.muted(padRight(label, LABEL_WIDTH)) +
|
|
165
|
-
' ' +
|
|
166
|
-
brand.primary('▸ ') +
|
|
167
|
-
brand.dim(value));
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Render the "command rail" navigation footer:
|
|
171
|
-
* ⟫ init ⟫ dev ⟫ build ⟫ deploy ⟫ publish
|
|
172
|
-
*/
|
|
338
|
+
return chalk.bgHex(palette.gray).hex('#0B1220').bold(` ${t('banner.mode.uninitialized').trim()} `);
|
|
339
|
+
}
|
|
340
|
+
function infoRow(label, value, lw) {
|
|
341
|
+
return brand.muted(padRight(label, lw)) + brand.border('│ ') + value;
|
|
342
|
+
}
|
|
173
343
|
function commandRail() {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.join(brand.muted(' '));
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Wide, full-fat cyber banner: ASCII logo + scan-line + bordered card.
|
|
181
|
-
*/
|
|
182
|
-
function printWideBanner(version, options) {
|
|
183
|
-
const cols = terminalWidth();
|
|
184
|
-
const cardWidth = Math.min(Math.max(LOGO_WIDTH + 8, 88), cols - 2);
|
|
185
|
-
const innerWidth = cardWidth - 4;
|
|
186
|
-
const lines = [];
|
|
187
|
-
lines.push('');
|
|
188
|
-
lines.push(' ' + brandedTopBorder(version, cardWidth));
|
|
189
|
-
lines.push(' ' + bodyLine(repoSubline(innerWidth), innerWidth));
|
|
190
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
191
|
-
const logoIndent = Math.max(0, Math.floor((innerWidth - LOGO_WIDTH) / 2));
|
|
192
|
-
const indent = ' '.repeat(logoIndent);
|
|
193
|
-
for (const logoLine of renderLogoLines()) {
|
|
194
|
-
lines.push(' ' + bodyLine(indent + logoLine, innerWidth));
|
|
195
|
-
}
|
|
196
|
-
const scanWidth = Math.min(innerWidth - 2, LOGO_WIDTH);
|
|
197
|
-
const scanIndent = ' '.repeat(Math.max(0, Math.floor((innerWidth - scanWidth) / 2)));
|
|
198
|
-
lines.push(' ' + bodyLine(scanIndent + scanline(scanWidth), innerWidth));
|
|
199
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
200
|
-
const ready = bannerReadyState(options);
|
|
201
|
-
const subtitle = chalk.bold(brand.accent('◆ ')) +
|
|
202
|
-
gradientText(t('banner.subtitle').trim(), [palette.accent, palette.primary, palette.pink], {
|
|
203
|
-
bold: true,
|
|
204
|
-
});
|
|
205
|
-
const stateLabel = ready.ready
|
|
206
|
-
? brand.success(t('banner.systemOnline').trim())
|
|
207
|
-
: brand.warn(t('banner.systemPending').trim());
|
|
208
|
-
const right = statusLights(ready.ready ? 'online' : 'pending') +
|
|
209
|
-
' ' +
|
|
210
|
-
brand.dim(t('banner.systemLabel').trim() + ' ') +
|
|
211
|
-
stateLabel;
|
|
212
|
-
lines.push(' ' + bodyLine(subtitle + spacer(subtitle, right, innerWidth) + right, innerWidth));
|
|
213
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
344
|
+
return brand.primary('》 ') + gradientText('init', [palette.primary, palette.accent]);
|
|
345
|
+
}
|
|
346
|
+
function appendInfoRows(lines, innerWidth, options, lw) {
|
|
214
347
|
if (options.project) {
|
|
215
|
-
lines.push('
|
|
216
|
-
bodyLine(brand.accent('◇ ') +
|
|
217
|
-
brand.muted(padRight(t('banner.label.mode').trim(), LABEL_WIDTH)) +
|
|
218
|
-
' ' +
|
|
219
|
-
modeChip(options.project.type), innerWidth));
|
|
348
|
+
lines.push(cardRow(infoRow(t('banner.label.mode').trim(), modeChip(options.project.type), lw), innerWidth));
|
|
220
349
|
}
|
|
221
350
|
if (options.projectRoot) {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (pulseWidth > 8) {
|
|
227
|
-
const filled = Math.max(1, Math.min(pulseWidth, Math.round(pulseWidth * ready.ratio)));
|
|
228
|
-
const pulse = pulseBar(pulseWidth, filled);
|
|
229
|
-
const pulseStatus = ready.ready
|
|
230
|
-
? t('banner.pulseReady').trim()
|
|
231
|
-
: t('banner.pulsePending').trim();
|
|
232
|
-
const pulseLine = brand.accent('◇ ') +
|
|
233
|
-
brand.muted(padRight(t('banner.pulseLabel').trim(), LABEL_WIDTH)) +
|
|
234
|
-
' ' +
|
|
235
|
-
pulse +
|
|
236
|
-
' ' +
|
|
237
|
-
(ready.ready ? brand.success(pulseStatus) : brand.warn(pulseStatus));
|
|
238
|
-
lines.push(' ' + bodyLine(pulseLine, innerWidth));
|
|
351
|
+
const pathValue = brand.primary('▶') +
|
|
352
|
+
brand.dim(' ') +
|
|
353
|
+
brand.dim(truncateText(homify(options.projectRoot), innerWidth - lw - 8));
|
|
354
|
+
lines.push(cardRow(infoRow(t('banner.label.path').trim(), pathValue, lw), innerWidth));
|
|
239
355
|
}
|
|
240
|
-
lines.
|
|
241
|
-
lines.push(' ' + bottomBorder(cardWidth));
|
|
242
|
-
lines.push(' ' + commandRail());
|
|
243
|
-
lines.push('');
|
|
244
|
-
for (const line of lines)
|
|
245
|
-
console.log(line);
|
|
356
|
+
appendComponentStatusRows(lines, innerWidth, options.status, lw);
|
|
246
357
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
const used = visibleLength(left) + visibleLength(right);
|
|
253
|
-
const gap = Math.max(2, innerWidth - used);
|
|
254
|
-
return ' '.repeat(gap);
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Compact cyber banner for terminals that cannot host the full ASCII logo.
|
|
258
|
-
*/
|
|
259
|
-
function printCompactBanner(version, options) {
|
|
260
|
-
const cols = terminalWidth();
|
|
261
|
-
const cardWidth = Math.min(cols - 2, 76);
|
|
262
|
-
const innerWidth = cardWidth - 4;
|
|
358
|
+
function composeBannerLines(version, options, { showAscii, width, startup } = {}) {
|
|
359
|
+
const innerWidth = width - 4;
|
|
360
|
+
const systemState = startup && !startup.ready ? 'pending' : resolveSystemState(options);
|
|
361
|
+
const components = (options.status && options.status.components) || [];
|
|
362
|
+
const lw = computeLabelWidth(components);
|
|
263
363
|
const lines = [];
|
|
264
364
|
lines.push('');
|
|
265
|
-
lines.push(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const ready = bannerReadyState(options);
|
|
269
|
-
const wordmark = brand.primary('▌▍▎ ') +
|
|
270
|
-
gradientText('REACTPRESS', [palette.pink, palette.primary, palette.accent], {
|
|
271
|
-
bold: true,
|
|
272
|
-
}) +
|
|
273
|
-
brand.primary(' ▎▍▌');
|
|
274
|
-
const lights = statusLights(ready.ready ? 'online' : 'pending');
|
|
275
|
-
lines.push(' ' + bodyLine(wordmark + spacer(wordmark, lights, innerWidth) + lights, innerWidth));
|
|
276
|
-
const subtitle = chalk.bold(brand.accent('◆ ')) + brand.dim(t('banner.subtitle').trim());
|
|
277
|
-
lines.push(' ' + bodyLine(subtitle, innerWidth));
|
|
278
|
-
lines.push(' ' + emptyBodyLine(innerWidth));
|
|
279
|
-
if (options.project) {
|
|
280
|
-
lines.push(' ' +
|
|
281
|
-
bodyLine(brand.accent('◇ ') +
|
|
282
|
-
brand.muted(padRight(t('banner.label.mode').trim(), LABEL_WIDTH)) +
|
|
283
|
-
' ' +
|
|
284
|
-
modeChip(options.project.type), innerWidth));
|
|
365
|
+
lines.push(cardTop(width));
|
|
366
|
+
for (const row of headerRows(innerWidth, version, systemState)) {
|
|
367
|
+
lines.push(cardRow(row, innerWidth));
|
|
285
368
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
369
|
+
lines.push(cardGap(innerWidth));
|
|
370
|
+
if (showAscii) {
|
|
371
|
+
const logoLines = startup && !startup.ready
|
|
372
|
+
? renderAnimatedLogoLines(startup.frame || 0, 1)
|
|
373
|
+
: renderLogoLines();
|
|
374
|
+
for (const logoLine of logoLines) {
|
|
375
|
+
lines.push(cardRow(centerLine(logoLine, innerWidth), innerWidth));
|
|
376
|
+
}
|
|
377
|
+
lines.push(cardGap(innerWidth));
|
|
378
|
+
lines.push(cardRow(centerLine(taglineRow(), innerWidth), innerWidth));
|
|
379
|
+
if (startup && !startup.ready) {
|
|
380
|
+
lines.push(cardRow(startupPulseRow(innerWidth, {
|
|
381
|
+
completed: startup.completed,
|
|
382
|
+
total: startup.total,
|
|
383
|
+
ready: startup.ready,
|
|
384
|
+
frame: startup.frame || 0,
|
|
385
|
+
}), innerWidth));
|
|
386
|
+
}
|
|
289
387
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
388
|
+
else {
|
|
389
|
+
const wordmark = startup && !startup.ready ? renderAnimatedWordmark(startup.frame || 0) : wordmarkHero();
|
|
390
|
+
lines.push(cardRow(centerLine(wordmark, innerWidth), innerWidth));
|
|
391
|
+
lines.push(cardRow(centerLine(taglineRow(), innerWidth), innerWidth));
|
|
392
|
+
if (startup && !startup.ready) {
|
|
393
|
+
lines.push(cardRow(startupPulseRow(innerWidth, {
|
|
394
|
+
completed: startup.completed,
|
|
395
|
+
total: startup.total,
|
|
396
|
+
ready: startup.ready,
|
|
397
|
+
frame: startup.frame || 0,
|
|
398
|
+
}), innerWidth));
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
lines.push(cardRow(softRule(innerWidth), innerWidth));
|
|
402
|
+
appendInfoRows(lines, innerWidth, options, lw);
|
|
403
|
+
lines.push(cardBottom(width));
|
|
404
|
+
lines.push(` ${commandRail()}`);
|
|
293
405
|
lines.push('');
|
|
406
|
+
return lines;
|
|
407
|
+
}
|
|
408
|
+
function printCardBanner(version, options, { showAscii, width, startup } = {}) {
|
|
409
|
+
const lines = composeBannerLines(version, options, { showAscii, width, startup });
|
|
294
410
|
for (const line of lines)
|
|
295
411
|
console.log(line);
|
|
296
412
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
413
|
+
function printCompactServiceStatus(status) {
|
|
414
|
+
if (!status || !Array.isArray(status.components))
|
|
415
|
+
return;
|
|
416
|
+
const lw = computeLabelWidth(status.components);
|
|
417
|
+
for (const component of status.components) {
|
|
418
|
+
console.log(` ${brand.muted(padRight(componentLabel(component), lw))}${brand.border('│ ')}${componentStatusPill(component)}`);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
function printCompactBanner(version, options) {
|
|
422
|
+
const systemState = resolveSystemState(options);
|
|
305
423
|
console.log('');
|
|
306
|
-
console.log(` ${
|
|
307
|
-
console.log(` ${brand.
|
|
308
|
-
|
|
309
|
-
|
|
424
|
+
console.log(` ${macTrafficLights()} ${brand.dim(`reactpress · v${version}`)} ${systemStatusBadge(systemState)}`);
|
|
425
|
+
console.log(` ${brand.muted(icon.link)} ${hyperlink(REPO_URL, brand.dim.underline(REPO_DISPLAY))}`);
|
|
426
|
+
console.log('');
|
|
427
|
+
for (const logoLine of renderLogoLines()) {
|
|
428
|
+
console.log(` ${logoLine}`);
|
|
310
429
|
}
|
|
430
|
+
console.log(` ${centerLine(taglineRow(), bannerColumns() - 4)}`);
|
|
431
|
+
if (options.project)
|
|
432
|
+
console.log(` ${modeChip(options.project.type)}`);
|
|
311
433
|
if (options.projectRoot) {
|
|
312
|
-
console.log(` ${
|
|
434
|
+
console.log(` ${brand.primary('▶')} ${brand.dim(homify(options.projectRoot))}`);
|
|
313
435
|
}
|
|
314
|
-
|
|
436
|
+
printCompactServiceStatus(options.status);
|
|
437
|
+
console.log(` ${commandRail()}`);
|
|
315
438
|
console.log('');
|
|
316
439
|
}
|
|
317
|
-
/**
|
|
318
|
-
* Print the top-of-screen banner. Adaptive to terminal width: collapses to a
|
|
319
|
-
* single-line greeting on very narrow terminals, otherwise renders a bordered
|
|
320
|
-
* cyber-card with the full ANSI Shadow logo when there is room.
|
|
321
|
-
*
|
|
322
|
-
* @param {{
|
|
323
|
-
* projectRoot?: string,
|
|
324
|
-
* project?: { type: string, hasClient: boolean, hasServerSource: boolean }
|
|
325
|
-
* }} [options]
|
|
326
|
-
*/
|
|
327
440
|
function printBanner(options = {}) {
|
|
328
|
-
const version =
|
|
329
|
-
const cols =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
if (cols < LOGO_WIDTH + 10) {
|
|
441
|
+
const version = getCliVersion();
|
|
442
|
+
const cols = bannerColumns();
|
|
443
|
+
const { showAscii, width } = resolveLayout(cols);
|
|
444
|
+
if (cols < CARD_MIN) {
|
|
335
445
|
printCompactBanner(version, options);
|
|
336
446
|
return;
|
|
337
447
|
}
|
|
338
|
-
|
|
448
|
+
printCardBanner(version, options, { showAscii, width });
|
|
339
449
|
}
|
|
340
|
-
/**
|
|
341
|
-
* Box helper retained for backwards compatibility: a few callers still
|
|
342
|
-
* import `box` from this module to wrap arbitrary multi-line content.
|
|
343
|
-
*/
|
|
344
450
|
function box(lines, { width } = {}) {
|
|
345
451
|
const innerWidth = width
|
|
346
452
|
? width - 4
|
|
347
453
|
: lines.reduce((max, line) => Math.max(max, visibleLength(line)), 0);
|
|
348
|
-
const horizontal = '
|
|
349
|
-
const top = brand.
|
|
350
|
-
const bottom = brand.
|
|
454
|
+
const horizontal = '─'.repeat(innerWidth + 2);
|
|
455
|
+
const top = brand.border(` ╭${horizontal}╮`);
|
|
456
|
+
const bottom = brand.border(` ╰${horizontal}╯`);
|
|
351
457
|
const body = lines.map((line) => {
|
|
352
458
|
const padded = padRight(line, innerWidth);
|
|
353
|
-
return brand.
|
|
459
|
+
return brand.border(' │ ') + padded + brand.border(' │');
|
|
354
460
|
});
|
|
355
461
|
return [top, ...body, bottom];
|
|
356
462
|
}
|
|
357
|
-
module.exports = {
|
|
463
|
+
module.exports = {
|
|
464
|
+
printBanner,
|
|
465
|
+
visibleLength,
|
|
466
|
+
padRight,
|
|
467
|
+
TECH_LOGO,
|
|
468
|
+
LOGO_GRADIENTS,
|
|
469
|
+
LOGO_WIDTH,
|
|
470
|
+
box,
|
|
471
|
+
commandRail,
|
|
472
|
+
renderLogoLines,
|
|
473
|
+
renderAnimatedLogoLines,
|
|
474
|
+
renderAnimatedWordmark,
|
|
475
|
+
composeBannerLines,
|
|
476
|
+
startupPulseRow,
|
|
477
|
+
resolveLayout,
|
|
478
|
+
bannerColumns,
|
|
479
|
+
titleBarRow,
|
|
480
|
+
macTrafficLights,
|
|
481
|
+
deriveSystemState,
|
|
482
|
+
resolveSystemState,
|
|
483
|
+
CORE_SYSTEM_SERVICES,
|
|
484
|
+
};
|
|
358
485
|
//# sourceMappingURL=banner.js.map
|