@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
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"zh": "Chinese",
|
|
3
|
+
"en": "English",
|
|
4
|
+
"serverNotAvaliable": "The server is going to launch a rocket for Musk now",
|
|
5
|
+
"pageMissing": "This page went to space with Bezos",
|
|
6
|
+
"archives": "Archives",
|
|
7
|
+
"total": "Total",
|
|
8
|
+
"totalSearch": "Totally searched ",
|
|
9
|
+
"piece": " Count",
|
|
10
|
+
"passwd": "Password",
|
|
11
|
+
"wrongPasswd": "Wrong Password",
|
|
12
|
+
"protectedArticleMsg": "The article is protected, please enter the access password",
|
|
13
|
+
"backHome": "Back to Home",
|
|
14
|
+
"confirm": "Confirm",
|
|
15
|
+
"unknownTitle": "Unknown Title",
|
|
16
|
+
"articleCover": "Article Cover",
|
|
17
|
+
"publishAt": "Publish At",
|
|
18
|
+
"readings": "Reading",
|
|
19
|
+
"copyrightInfo": "Copyright Information",
|
|
20
|
+
"copyrightContent": "Non-commercial-Attribution-Freely Reprinted",
|
|
21
|
+
"categoryArticle": "Category",
|
|
22
|
+
"gettingArticle": "Fetching articles...",
|
|
23
|
+
"comment": "Comment",
|
|
24
|
+
"gettingKnowledge": "Fetching knowledge books...",
|
|
25
|
+
"knowledgeBooks": "Knowledge Books",
|
|
26
|
+
"readingCount": "reading",
|
|
27
|
+
"startReading": "Start Reading",
|
|
28
|
+
"pleaseWait": "Coming soon",
|
|
29
|
+
"otherKnowledges": "Other Knowledge Books",
|
|
30
|
+
"unknownKnowledgeChapter": "Unknown Chapter",
|
|
31
|
+
"recommendToReading": "Recommended Readings",
|
|
32
|
+
"yu": "About",
|
|
33
|
+
"tagRelativeArticles": "tag related articles",
|
|
34
|
+
"all": "All",
|
|
35
|
+
"readingCountTemplate": "reading",
|
|
36
|
+
"articleCountTemplate": "count",
|
|
37
|
+
"share": "Share",
|
|
38
|
+
"empty": "No data",
|
|
39
|
+
"categoryTitle": "Category",
|
|
40
|
+
"home": "Home",
|
|
41
|
+
"knowledge": "Knowledge",
|
|
42
|
+
"commentNamespace": {
|
|
43
|
+
"reply": "Reply",
|
|
44
|
+
"emoji": "Emoji",
|
|
45
|
+
"replyPlaceholder": "Please enter the content of the comment (Markdown is supported)",
|
|
46
|
+
"publish": "Send",
|
|
47
|
+
"close": "Close",
|
|
48
|
+
"commentSuccess": "The comment is successful and has been submitted for review",
|
|
49
|
+
"userInfoTitle": "Please set your information",
|
|
50
|
+
"userInfoName": "Username",
|
|
51
|
+
"userInfoNameValidMsg": "Please tell me your name",
|
|
52
|
+
"userInfoPassword": "Password",
|
|
53
|
+
"userInfoPasswordValidMsg": "Please enter correct password",
|
|
54
|
+
"userInfoEmail": "Email",
|
|
55
|
+
"userInfoEmailValidMsg": "Please enter email",
|
|
56
|
+
"userInfoIllegalEmailValidMsg": "Please enter correct email",
|
|
57
|
+
"userInfoConfirm": "Login",
|
|
58
|
+
"userInfoCancel": "Cancel",
|
|
59
|
+
"logout": "Logout",
|
|
60
|
+
"register": "Register",
|
|
61
|
+
"userRegister": "User Register",
|
|
62
|
+
"userInfoPleaseEnterConfirmPassword": "Confirm Password",
|
|
63
|
+
"confirmPasswordIsNotMatchTips": "Confirm password is not match your password",
|
|
64
|
+
"registerSuccessTips": "Register Success",
|
|
65
|
+
"registerSuccessToLoginTips": "Registration successful, login now ?",
|
|
66
|
+
"loginSuccess": "Login succeeded",
|
|
67
|
+
"areYouNoAccount": "Don't have an account?",
|
|
68
|
+
"registerNow": "Register now?",
|
|
69
|
+
"openAuth": "Use third-party login",
|
|
70
|
+
"areYouHasAccount": "Do you already have an account?",
|
|
71
|
+
"loginNow": "Login now",
|
|
72
|
+
"toggleNeedSetInfo": "Incomplete email information, please complete personal information.",
|
|
73
|
+
"guestCommentLead": "Enter your name and email to comment — no login required.",
|
|
74
|
+
"commentingAs": "Commenting as {name}"
|
|
75
|
+
},
|
|
76
|
+
"loading": "Loading",
|
|
77
|
+
"copySuccess": "Copied",
|
|
78
|
+
"shareLinkCopied": "Share link copied",
|
|
79
|
+
"copy": "copy",
|
|
80
|
+
"article": "Articles",
|
|
81
|
+
"skipToContent": "Skip to content",
|
|
82
|
+
"search": "Search",
|
|
83
|
+
"searchArticle": "Search Articles",
|
|
84
|
+
"searchArticlePlaceholder": "Enter keywords, search articles",
|
|
85
|
+
"shareNamespace": {
|
|
86
|
+
"title": "Share Poster",
|
|
87
|
+
"createingPoster": "The poster is being generated, please be patient...",
|
|
88
|
+
"createdPosterSuccess": "The poster is completed.",
|
|
89
|
+
"createdPosterError": "Fail to generate poster.",
|
|
90
|
+
"qrcode": "Scan the QR code to read the article",
|
|
91
|
+
"shareFrom": " Original shared from "
|
|
92
|
+
},
|
|
93
|
+
"tagTitle": "Tags",
|
|
94
|
+
"toc": "Toc",
|
|
95
|
+
"logingWithGithub": "Login With Github, Please wait...",
|
|
96
|
+
"useGithubToLogin": "Login with Github account",
|
|
97
|
+
"loginTipMessage": "Please login, otherwise you will not be able to comment. If you need an account, you can go to the admin system to register",
|
|
98
|
+
"rssSubscribe": "RSS Subscription",
|
|
99
|
+
"aboutUs": "About Us",
|
|
100
|
+
"nav": "Navigation",
|
|
101
|
+
"suggestions": "Suggestions",
|
|
102
|
+
"theme": {
|
|
103
|
+
"toggle": "Toggle theme"
|
|
104
|
+
},
|
|
105
|
+
"locale": {
|
|
106
|
+
"switch": "Switch language",
|
|
107
|
+
"switchToEn": "Switch to English",
|
|
108
|
+
"switchToZh": "Switch to Chinese"
|
|
109
|
+
},
|
|
110
|
+
"pageTitleNavSite": "Site Navigation",
|
|
111
|
+
"pageTitleLogin": "Login",
|
|
112
|
+
"pageTitleTag": "Tag: {label}",
|
|
113
|
+
"pageTitleCategory": "Category: {label}",
|
|
114
|
+
"pageTitleNavDetail": "Navigation: {label}",
|
|
115
|
+
"navPreviewDisclaimer": "This site only provides content previews and does not store any information. Please protect your account and property. If content cannot be previewed, click \"Open site\" to view it externally.",
|
|
116
|
+
"navOpenSite": "Open site ›",
|
|
117
|
+
"commentShowMore": "Show more ↓",
|
|
118
|
+
"commentShowLess": "Collapse ↑",
|
|
119
|
+
"navExpandMenu": "Expand menu",
|
|
120
|
+
"navCollapseMenu": "Collapse menu",
|
|
121
|
+
"navCategoryMenu": "Navigation categories",
|
|
122
|
+
"carouselPrev": "Previous slide, {current} of {total}",
|
|
123
|
+
"carouselNext": "Next slide, {current} of {total}",
|
|
124
|
+
"aboutUsFallback": "ReactPress — Modern blog publishing platform"
|
|
125
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"zh": "汉语",
|
|
3
|
+
"en": "英文",
|
|
4
|
+
"serverNotAvaliable": "服务器暂时去给马斯克发射火箭去了",
|
|
5
|
+
"pageMissing": "页面和贝佐斯去太空旅行了~~",
|
|
6
|
+
"archives": "时光圈",
|
|
7
|
+
"total": "共计",
|
|
8
|
+
"totalSearch": "共搜索到",
|
|
9
|
+
"piece": "篇",
|
|
10
|
+
"passwd": "密码",
|
|
11
|
+
"wrongPasswd": "密码错误",
|
|
12
|
+
"protectedArticleMsg": "文章受保护,请输入访问密码",
|
|
13
|
+
"backHome": "回首页",
|
|
14
|
+
"confirm": "确认",
|
|
15
|
+
"unknownTitle": "未知标题",
|
|
16
|
+
"articleCover": "文章封面",
|
|
17
|
+
"publishAt": "发布于",
|
|
18
|
+
"readings": "阅读量",
|
|
19
|
+
"copyrightInfo": "版权信息",
|
|
20
|
+
"copyrightContent": "非商用-署名-自由转载,转载请注明出处。",
|
|
21
|
+
"categoryArticle": "分类文章",
|
|
22
|
+
"gettingArticle": "正在获取文章...",
|
|
23
|
+
"comment": "评论",
|
|
24
|
+
"gettingKnowledge": "正在获取知识...",
|
|
25
|
+
"knowledgeBooks": "专辑",
|
|
26
|
+
"readingCount": "次阅读",
|
|
27
|
+
"startReading": "开始阅读",
|
|
28
|
+
"pleaseWait": "敬请期待",
|
|
29
|
+
"otherKnowledges": "其他知识笔记",
|
|
30
|
+
"unknownKnowledgeChapter": "未知章节内容",
|
|
31
|
+
"recommendToReading": "推荐阅读",
|
|
32
|
+
"yu": "与",
|
|
33
|
+
"tagRelativeArticles": "标签有关的文章",
|
|
34
|
+
"all": "所有",
|
|
35
|
+
"readingCountTemplate": "次阅读",
|
|
36
|
+
"articleCountTemplate": "篇文章",
|
|
37
|
+
"share": "分享",
|
|
38
|
+
"empty": "暂无数据",
|
|
39
|
+
"categoryTitle": "文章分类",
|
|
40
|
+
"commentNamespace": {
|
|
41
|
+
"reply": "回复",
|
|
42
|
+
"emoji": "表情",
|
|
43
|
+
"replyPlaceholder": "请输入评论内容(支持 Markdown)",
|
|
44
|
+
"publish": "发布",
|
|
45
|
+
"close": "收起",
|
|
46
|
+
"commentSuccess": "评论成功,已提交审核",
|
|
47
|
+
"userInfoTitle": "帐密登录",
|
|
48
|
+
"userInfoName": "名称",
|
|
49
|
+
"userInfoNameValidMsg": "请输入您的称呼",
|
|
50
|
+
"userInfoPassword": "密码",
|
|
51
|
+
"userInfoPasswordValidMsg": "请输入密码",
|
|
52
|
+
"userInfoEmail": "邮箱",
|
|
53
|
+
"userInfoEmailValidMsg": "请输入邮箱",
|
|
54
|
+
"userInfoIllegalEmailValidMsg": "邮箱格式不正确",
|
|
55
|
+
"userInfoConfirm": "登录",
|
|
56
|
+
"userInfoCancel": "取消",
|
|
57
|
+
"logout": "退出",
|
|
58
|
+
"register": "注册",
|
|
59
|
+
"userRegister": "用户注册",
|
|
60
|
+
"userInfoPleaseEnterConfirmPassword": "请输入确认密码",
|
|
61
|
+
"confirmPasswordIsNotMatchTips": "确认密码和密码不匹配",
|
|
62
|
+
"registerSuccessTips": "注册成功",
|
|
63
|
+
"registerSuccessToLoginTips": "注册成功, 是否跳转到登陆",
|
|
64
|
+
"loginSuccess": "登录成功",
|
|
65
|
+
"areYouNoAccount": "没有账号?",
|
|
66
|
+
"registerNow": "立即注册",
|
|
67
|
+
"openAuth": "第三方登录",
|
|
68
|
+
"areYouHasAccount": "已有账号?",
|
|
69
|
+
"loginNow": "立即登录",
|
|
70
|
+
"toggleNeedSetInfo": "邮箱信息不完整,请完善个人资料。",
|
|
71
|
+
"guestCommentLead": "填写昵称与邮箱即可评论,无需登录。",
|
|
72
|
+
"commentingAs": "以 {name} 的身份发表评论"
|
|
73
|
+
},
|
|
74
|
+
"loading": "加载中",
|
|
75
|
+
"copySuccess": "已复制",
|
|
76
|
+
"shareLinkCopied": "分享链接复制成功",
|
|
77
|
+
"copy": "复制",
|
|
78
|
+
"article": "文章",
|
|
79
|
+
"home": "首页",
|
|
80
|
+
"skipToContent": "跳到正文",
|
|
81
|
+
"knowledge": "专辑",
|
|
82
|
+
"search": "搜索",
|
|
83
|
+
"searchArticle": "文章搜索",
|
|
84
|
+
"searchArticlePlaceholder": "输入关键字,搜索文章",
|
|
85
|
+
"shareNamespace": {
|
|
86
|
+
"title": "分享海报",
|
|
87
|
+
"createingPoster": "海报生成中,请耐心等待...",
|
|
88
|
+
"createdPosterSuccess": "分享海报制作完成。",
|
|
89
|
+
"createdPosterError": "分享海报制作失败,请手动截图",
|
|
90
|
+
"qrcode": "识别二维码查看文章",
|
|
91
|
+
"shareFrom": " 原文分享自"
|
|
92
|
+
},
|
|
93
|
+
"tagTitle": "文章标签",
|
|
94
|
+
"toc": "目录",
|
|
95
|
+
"logingWithGithub": "Github 授权登录中,请稍等......",
|
|
96
|
+
"useGithubToLogin": "使用 Github 账号登录",
|
|
97
|
+
"loginTipMessage": "请登录账号,否则无法进行评论。",
|
|
98
|
+
"rssSubscribe": "RSS 订阅",
|
|
99
|
+
"aboutUs": "关于我们",
|
|
100
|
+
"nav": "导航",
|
|
101
|
+
"suggestions": "建议",
|
|
102
|
+
"theme": {
|
|
103
|
+
"toggle": "切换主题"
|
|
104
|
+
},
|
|
105
|
+
"locale": {
|
|
106
|
+
"switch": "切换语言",
|
|
107
|
+
"switchToEn": "切换到 English",
|
|
108
|
+
"switchToZh": "切换到中文"
|
|
109
|
+
},
|
|
110
|
+
"pageTitleNavSite": "网址导航",
|
|
111
|
+
"pageTitleLogin": "登录",
|
|
112
|
+
"pageTitleTag": "标签:{label}",
|
|
113
|
+
"pageTitleCategory": "分类:{label}",
|
|
114
|
+
"pageTitleNavDetail": "导航:{label}",
|
|
115
|
+
"navPreviewDisclaimer": "本站只做内容预览,不做任何信息存储,请注意您的账号和财产安全。如遇内容无法预览,请点击「打开网站」按钮预览。",
|
|
116
|
+
"navOpenSite": "打开网站 ›",
|
|
117
|
+
"commentShowMore": "查看更多 ↓",
|
|
118
|
+
"commentShowLess": "收起 ↑",
|
|
119
|
+
"navExpandMenu": "展开目录",
|
|
120
|
+
"navCollapseMenu": "收起目录",
|
|
121
|
+
"navCategoryMenu": "导航分类",
|
|
122
|
+
"carouselPrev": "上一张,第 {current} 张,共 {total} 张",
|
|
123
|
+
"carouselNext": "下一张,第 {current} 张,共 {total} 张",
|
|
124
|
+
"aboutUsFallback": "ReactPress — 现代化博客发布平台"
|
|
125
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.devPortRedirectPlugin = exports.shouldRedirectDevPortToNginx = exports.resolveNginxEntryUrl = exports.resolveDevPortRole = exports.isNginxDevRedirectEnabled = exports.isDirectDevPortAccess = exports.buildDevPortRedirectUrl = void 0;
|
|
4
|
+
var portRedirect_1 = require("./portRedirect");
|
|
5
|
+
Object.defineProperty(exports, "buildDevPortRedirectUrl", { enumerable: true, get: function () { return portRedirect_1.buildDevPortRedirectUrl; } });
|
|
6
|
+
Object.defineProperty(exports, "isDirectDevPortAccess", { enumerable: true, get: function () { return portRedirect_1.isDirectDevPortAccess; } });
|
|
7
|
+
Object.defineProperty(exports, "isNginxDevRedirectEnabled", { enumerable: true, get: function () { return portRedirect_1.isNginxDevRedirectEnabled; } });
|
|
8
|
+
Object.defineProperty(exports, "resolveDevPortRole", { enumerable: true, get: function () { return portRedirect_1.resolveDevPortRole; } });
|
|
9
|
+
Object.defineProperty(exports, "resolveNginxEntryUrl", { enumerable: true, get: function () { return portRedirect_1.resolveNginxEntryUrl; } });
|
|
10
|
+
Object.defineProperty(exports, "shouldRedirectDevPortToNginx", { enumerable: true, get: function () { return portRedirect_1.shouldRedirectDevPortToNginx; } });
|
|
11
|
+
var vitePortRedirectPlugin_1 = require("./vitePortRedirectPlugin");
|
|
12
|
+
Object.defineProperty(exports, "devPortRedirectPlugin", { enumerable: true, get: function () { return vitePortRedirectPlugin_1.devPortRedirectPlugin; } });
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveDevPortRole = resolveDevPortRole;
|
|
4
|
+
exports.isNginxDevRedirectEnabled = isNginxDevRedirectEnabled;
|
|
5
|
+
exports.resolveNginxEntryUrl = resolveNginxEntryUrl;
|
|
6
|
+
exports.isDirectDevPortAccess = isDirectDevPortAccess;
|
|
7
|
+
exports.shouldRedirectDevPortToNginx = shouldRedirectDevPortToNginx;
|
|
8
|
+
exports.buildDevPortRedirectUrl = buildDevPortRedirectUrl;
|
|
9
|
+
const DEFAULT_NGINX_PORT = 80;
|
|
10
|
+
function readPortEnv(key, fallback) {
|
|
11
|
+
const raw = process.env[key]?.trim();
|
|
12
|
+
if (!raw)
|
|
13
|
+
return fallback;
|
|
14
|
+
const parsed = parseInt(raw, 10);
|
|
15
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
|
|
16
|
+
}
|
|
17
|
+
function resolveDevPortRole(directPort) {
|
|
18
|
+
const apiPort = readPortEnv('SERVER_PORT', 3002);
|
|
19
|
+
const adminPort = readPortEnv('WEB_ADMIN_PORT', 3000);
|
|
20
|
+
if (directPort === apiPort)
|
|
21
|
+
return 'api';
|
|
22
|
+
if (directPort === adminPort)
|
|
23
|
+
return 'admin';
|
|
24
|
+
return 'visitor';
|
|
25
|
+
}
|
|
26
|
+
function isNginxDevRedirectEnabled() {
|
|
27
|
+
return Boolean(process.env.REACTPRESS_NGINX_ENTRY_URL?.trim());
|
|
28
|
+
}
|
|
29
|
+
function resolveNginxEntryUrl() {
|
|
30
|
+
const override = process.env.REACTPRESS_NGINX_ENTRY_URL?.trim();
|
|
31
|
+
if (override) {
|
|
32
|
+
return override.replace(/\/$/, '');
|
|
33
|
+
}
|
|
34
|
+
const rawPort = process.env.NGINX_PORT?.trim();
|
|
35
|
+
const port = rawPort ? parseInt(rawPort, 10) : DEFAULT_NGINX_PORT;
|
|
36
|
+
if (Number.isFinite(port) && port > 0 && port !== DEFAULT_NGINX_PORT) {
|
|
37
|
+
return `http://localhost:${port}`;
|
|
38
|
+
}
|
|
39
|
+
return 'http://localhost';
|
|
40
|
+
}
|
|
41
|
+
function isDirectDevPortAccess(host, port) {
|
|
42
|
+
if (!host || !Number.isFinite(port) || port <= 0)
|
|
43
|
+
return false;
|
|
44
|
+
const normalized = host.toLowerCase();
|
|
45
|
+
return (normalized === `localhost:${port}` ||
|
|
46
|
+
normalized === `127.0.0.1:${port}` ||
|
|
47
|
+
normalized === `[::1]:${port}`);
|
|
48
|
+
}
|
|
49
|
+
function acceptsHtmlNavigation(accept) {
|
|
50
|
+
if (!accept)
|
|
51
|
+
return false;
|
|
52
|
+
return accept.includes('text/html');
|
|
53
|
+
}
|
|
54
|
+
function shouldRedirectDevPortToNginx(options) {
|
|
55
|
+
if (process.env.NODE_ENV === 'production')
|
|
56
|
+
return false;
|
|
57
|
+
if (process.env.REACTPRESS_SKIP_DEV_PORT_REDIRECT === '1')
|
|
58
|
+
return false;
|
|
59
|
+
if (!isNginxDevRedirectEnabled())
|
|
60
|
+
return false;
|
|
61
|
+
const method = (options.method || 'GET').toUpperCase();
|
|
62
|
+
if (method !== 'GET' && method !== 'HEAD')
|
|
63
|
+
return false;
|
|
64
|
+
if (!isDirectDevPortAccess(options.host, options.directPort))
|
|
65
|
+
return false;
|
|
66
|
+
if (!acceptsHtmlNavigation(options.accept))
|
|
67
|
+
return false;
|
|
68
|
+
const pathname = options.pathname || '/';
|
|
69
|
+
if (options.skipPathPrefixes?.some((prefix) => pathname.startsWith(prefix))) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
function buildDevPortRedirectUrl(options) {
|
|
75
|
+
const entry = (options.nginxEntryUrl || resolveNginxEntryUrl()).replace(/\/$/, '');
|
|
76
|
+
const pathname = options.pathname || '/';
|
|
77
|
+
const search = options.search || '';
|
|
78
|
+
const role = resolveDevPortRole(options.directPort);
|
|
79
|
+
if (role === 'api') {
|
|
80
|
+
if (pathname === '/' || pathname === '') {
|
|
81
|
+
return `${entry}/api${search}`;
|
|
82
|
+
}
|
|
83
|
+
return `${entry}${pathname}${search}`;
|
|
84
|
+
}
|
|
85
|
+
if (role === 'admin') {
|
|
86
|
+
let adminPath = pathname;
|
|
87
|
+
if (!adminPath.startsWith('/admin')) {
|
|
88
|
+
adminPath = adminPath === '/' ? '/admin/' : `/admin${adminPath.startsWith('/') ? adminPath : `/${adminPath}`}`;
|
|
89
|
+
}
|
|
90
|
+
return `${entry}${adminPath}${search}`;
|
|
91
|
+
}
|
|
92
|
+
return `${entry}${pathname}${search}`;
|
|
93
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.devPortRedirectPlugin = devPortRedirectPlugin;
|
|
4
|
+
const portRedirect_1 = require("./portRedirect");
|
|
5
|
+
const VITE_DEV_SKIP_PREFIXES = ['/@vite', '/@fs', '/@id', '/node_modules'];
|
|
6
|
+
function createRedirectMiddleware(port) {
|
|
7
|
+
return (req, res, next) => {
|
|
8
|
+
const url = req.url || '/';
|
|
9
|
+
const pathname = url.split('?')[0] || '/';
|
|
10
|
+
const search = url.includes('?') ? url.slice(url.indexOf('?')) : '';
|
|
11
|
+
if (!(0, portRedirect_1.shouldRedirectDevPortToNginx)({
|
|
12
|
+
host: req.headers.host,
|
|
13
|
+
method: req.method,
|
|
14
|
+
accept: req.headers.accept,
|
|
15
|
+
directPort: port,
|
|
16
|
+
pathname,
|
|
17
|
+
skipPathPrefixes: VITE_DEV_SKIP_PREFIXES,
|
|
18
|
+
})) {
|
|
19
|
+
next();
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const target = (0, portRedirect_1.buildDevPortRedirectUrl)({
|
|
23
|
+
directPort: port,
|
|
24
|
+
pathname,
|
|
25
|
+
search,
|
|
26
|
+
});
|
|
27
|
+
res.statusCode = 302;
|
|
28
|
+
res.setHeader('Location', target);
|
|
29
|
+
res.end();
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Redirect direct :3000 browser hits to nginx entry when REACTPRESS_NGINX_ENTRY_URL is set. */
|
|
33
|
+
function devPortRedirectPlugin(port) {
|
|
34
|
+
return {
|
|
35
|
+
name: 'reactpress-dev-port-redirect',
|
|
36
|
+
configureServer(server) {
|
|
37
|
+
server.middlewares.use(createRedirectMiddleware(port));
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.THEME_BRANDING_DIRECT_MODS = exports.THEME_BRANDING_MOD_TO_SETTING = void 0;
|
|
4
|
+
exports.seedThemeModsFromLegacySetting = seedThemeModsFromLegacySetting;
|
|
5
|
+
exports.applyThemeModsToSiteSetting = applyThemeModsToSiteSetting;
|
|
6
|
+
exports.brandingModValue = brandingModValue;
|
|
7
|
+
/** Customizer mod id → legacy Setting column (runtime overlay for themes). */
|
|
8
|
+
exports.THEME_BRANDING_MOD_TO_SETTING = {
|
|
9
|
+
displayTitle: 'systemTitle',
|
|
10
|
+
displayTagline: 'systemSubTitle',
|
|
11
|
+
siteLogo: 'systemLogo',
|
|
12
|
+
backgroundImage: 'systemBg',
|
|
13
|
+
siteFavicon: 'systemFavicon',
|
|
14
|
+
siteNotice: 'systemNoticeInfo',
|
|
15
|
+
seoKeyword: 'seoKeyword',
|
|
16
|
+
seoDesc: 'seoDesc',
|
|
17
|
+
baiduAnalyticsId: 'baiduAnalyticsId',
|
|
18
|
+
googleAnalyticsId: 'googleAnalyticsId',
|
|
19
|
+
};
|
|
20
|
+
/** Mod ids stored under the same key in mods and Setting overlay. */
|
|
21
|
+
exports.THEME_BRANDING_DIRECT_MODS = [
|
|
22
|
+
'systemFooterInfo',
|
|
23
|
+
'aboutUsGithubUrl',
|
|
24
|
+
'aboutUsCommentQr',
|
|
25
|
+
'aboutUsWechatQr',
|
|
26
|
+
];
|
|
27
|
+
function modValue(mods, modId) {
|
|
28
|
+
const v = mods[modId];
|
|
29
|
+
if (v == null || String(v).trim() === '')
|
|
30
|
+
return undefined;
|
|
31
|
+
return String(v);
|
|
32
|
+
}
|
|
33
|
+
/** Build customizer form seed from legacy Setting columns (one-time / fallback). */
|
|
34
|
+
function seedThemeModsFromLegacySetting(setting, mods = {}) {
|
|
35
|
+
const merged = { ...mods };
|
|
36
|
+
for (const [modId, settingKey] of Object.entries(exports.THEME_BRANDING_MOD_TO_SETTING)) {
|
|
37
|
+
if (!modValue(merged, modId) && setting?.[settingKey] != null) {
|
|
38
|
+
merged[modId] = String(setting[settingKey]);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
for (const key of exports.THEME_BRANDING_DIRECT_MODS) {
|
|
42
|
+
if (!modValue(merged, key) && setting?.[key] != null) {
|
|
43
|
+
merged[key] = String(setting[key]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return merged;
|
|
47
|
+
}
|
|
48
|
+
/** Overlay theme mods onto a Setting-shaped object for theme runtime & mail templates. */
|
|
49
|
+
function applyThemeModsToSiteSetting(setting, mods) {
|
|
50
|
+
const next = { ...setting };
|
|
51
|
+
for (const [modId, settingKey] of Object.entries(exports.THEME_BRANDING_MOD_TO_SETTING)) {
|
|
52
|
+
const v = modValue(mods, modId);
|
|
53
|
+
if (v)
|
|
54
|
+
next[settingKey] = v;
|
|
55
|
+
}
|
|
56
|
+
for (const key of exports.THEME_BRANDING_DIRECT_MODS) {
|
|
57
|
+
const v = modValue(mods, key);
|
|
58
|
+
if (v)
|
|
59
|
+
next[key] = v;
|
|
60
|
+
}
|
|
61
|
+
return next;
|
|
62
|
+
}
|
|
63
|
+
function brandingModValue(mods, modId) {
|
|
64
|
+
return modValue(mods, modId);
|
|
65
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultsFromSchema = defaultsFromSchema;
|
|
4
|
+
/** Collect `default` values from a JSON Schema object tree. */
|
|
5
|
+
function defaultsFromSchema(schema) {
|
|
6
|
+
if (!schema?.properties)
|
|
7
|
+
return {};
|
|
8
|
+
const out = {};
|
|
9
|
+
for (const [key, prop] of Object.entries(schema.properties)) {
|
|
10
|
+
const value = defaultFromProperty(prop);
|
|
11
|
+
if (value !== undefined) {
|
|
12
|
+
out[key] = value;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
function defaultFromProperty(prop) {
|
|
18
|
+
if (!prop)
|
|
19
|
+
return undefined;
|
|
20
|
+
if (prop.default !== undefined)
|
|
21
|
+
return prop.default;
|
|
22
|
+
if (prop.type === 'object' && prop.properties) {
|
|
23
|
+
const nested = {};
|
|
24
|
+
for (const [k, p] of Object.entries(prop.properties)) {
|
|
25
|
+
const v = defaultFromProperty(p);
|
|
26
|
+
if (v !== undefined)
|
|
27
|
+
nested[k] = v;
|
|
28
|
+
}
|
|
29
|
+
return Object.keys(nested).length ? nested : undefined;
|
|
30
|
+
}
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerFormilyWidget = registerFormilyWidget;
|
|
4
|
+
exports.toFormilyJsonSchema = toFormilyJsonSchema;
|
|
5
|
+
exports.getFormilyVoidComponents = getFormilyVoidComponents;
|
|
6
|
+
const VOID_COMPONENTS = [
|
|
7
|
+
'FormLayout',
|
|
8
|
+
'FormGrid',
|
|
9
|
+
'FormGrid.GridColumn',
|
|
10
|
+
'SectionCard',
|
|
11
|
+
'FormCollapse',
|
|
12
|
+
'FormCollapse.CollapsePanel',
|
|
13
|
+
'CollapsePanel',
|
|
14
|
+
'FormTab',
|
|
15
|
+
'FormTab.TabPane',
|
|
16
|
+
];
|
|
17
|
+
/** Map `x-ui.widget` → Formily `x-component` (extend via registerFormilyWidget). */
|
|
18
|
+
const WIDGET_COMPONENT_MAP = {
|
|
19
|
+
navLinkList: 'NavLinkListField',
|
|
20
|
+
urlConfigEditor: 'JsonConfigEditor',
|
|
21
|
+
navSearchEditor: 'JsonConfigEditor',
|
|
22
|
+
};
|
|
23
|
+
const registeredWidgets = { ...WIDGET_COMPONENT_MAP };
|
|
24
|
+
function registerFormilyWidget(widgetId, componentName) {
|
|
25
|
+
registeredWidgets[widgetId] = componentName;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Convert theme `reactpress.configuration` JSON Schema to Formily render schema.
|
|
29
|
+
* Adds `x-decorator` / `x-component` from types and `x-ui.widget`.
|
|
30
|
+
*/
|
|
31
|
+
function toFormilyJsonSchema(schema) {
|
|
32
|
+
if (!schema || schema.type !== 'object')
|
|
33
|
+
return null;
|
|
34
|
+
const root = convertProperty({ ...schema, type: 'object' }, 0, true);
|
|
35
|
+
const sectionProps = (root.properties ?? {});
|
|
36
|
+
return {
|
|
37
|
+
type: 'object',
|
|
38
|
+
'x-component': 'FormLayout',
|
|
39
|
+
'x-component-props': { layout: 'vertical', style: { width: '100%' } },
|
|
40
|
+
properties: wrapRootSections(sectionProps),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Full-width section cards; field paths stay `header.*` / `nav.*`. */
|
|
44
|
+
function wrapRootSections(properties) {
|
|
45
|
+
return Object.fromEntries(Object.entries(properties).map(([key, child]) => {
|
|
46
|
+
const title = typeof child.title === 'string' ? child.title : key;
|
|
47
|
+
const inner = withObjectLayout(child);
|
|
48
|
+
return [
|
|
49
|
+
key,
|
|
50
|
+
{
|
|
51
|
+
...inner,
|
|
52
|
+
'x-decorator': 'SectionCard',
|
|
53
|
+
'x-decorator-props': {
|
|
54
|
+
title,
|
|
55
|
+
sectionId: `theme-section-${key}`,
|
|
56
|
+
feedbackLayout: 'none',
|
|
57
|
+
layout: 'vertical',
|
|
58
|
+
fullness: true,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
/** Ensure nested object fields render their properties in Formily. */
|
|
65
|
+
function withObjectLayout(node, title) {
|
|
66
|
+
if (node.type !== 'object' || !node.properties)
|
|
67
|
+
return node;
|
|
68
|
+
const props = node.properties;
|
|
69
|
+
const keys = Object.keys(props);
|
|
70
|
+
return {
|
|
71
|
+
...node,
|
|
72
|
+
...(keys.length > 1 ? { title } : {}),
|
|
73
|
+
'x-component': 'FormLayout',
|
|
74
|
+
'x-component-props': { layout: 'vertical' },
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function convertProperty(node, depth, isRoot = false) {
|
|
78
|
+
const ui = node['x-ui'];
|
|
79
|
+
if (ui?.hidden) {
|
|
80
|
+
return { ...node, 'x-display': 'hidden' };
|
|
81
|
+
}
|
|
82
|
+
const type = typeof node.type === 'string' ? node.type : undefined;
|
|
83
|
+
if (type === 'object') {
|
|
84
|
+
const widget = ui?.widget ? registeredWidgets[ui.widget] : undefined;
|
|
85
|
+
if (widget === 'JsonConfigEditor') {
|
|
86
|
+
return {
|
|
87
|
+
...stripMeta(node),
|
|
88
|
+
type: 'object',
|
|
89
|
+
'x-decorator': 'FormItem',
|
|
90
|
+
'x-decorator-props': {
|
|
91
|
+
feedbackLayout: 'none',
|
|
92
|
+
layout: 'vertical',
|
|
93
|
+
fullness: true,
|
|
94
|
+
wrapperCol: 24,
|
|
95
|
+
},
|
|
96
|
+
'x-component': 'JsonConfigEditor',
|
|
97
|
+
'x-component-props': { height: 360 },
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if (node.properties) {
|
|
101
|
+
const properties = Object.fromEntries(Object.entries(node.properties).map(([key, child]) => [
|
|
102
|
+
key,
|
|
103
|
+
convertProperty(child, depth + 1),
|
|
104
|
+
]));
|
|
105
|
+
return {
|
|
106
|
+
...stripMeta(node),
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (type === 'array') {
|
|
113
|
+
const widget = ui?.widget ? registeredWidgets[ui.widget] : undefined;
|
|
114
|
+
const out = {
|
|
115
|
+
...stripMeta(node),
|
|
116
|
+
type: 'array',
|
|
117
|
+
'x-decorator': 'FormItem',
|
|
118
|
+
'x-decorator-props': {
|
|
119
|
+
feedbackLayout: 'none',
|
|
120
|
+
layout: 'vertical',
|
|
121
|
+
colon: false,
|
|
122
|
+
fullness: true,
|
|
123
|
+
wrapperCol: 24,
|
|
124
|
+
},
|
|
125
|
+
'x-component': widget ?? 'ArrayCards',
|
|
126
|
+
'x-component-props': widget === 'NavLinkListField'
|
|
127
|
+
? {}
|
|
128
|
+
: widget === 'ArrayCards'
|
|
129
|
+
? { title: node.title ?? 'Item' }
|
|
130
|
+
: {},
|
|
131
|
+
};
|
|
132
|
+
if (widget !== 'NavLinkListField' && node.items && typeof node.items === 'object' && !Array.isArray(node.items)) {
|
|
133
|
+
out.items = convertProperty(node.items, depth + 1);
|
|
134
|
+
}
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
if (type === 'boolean') {
|
|
138
|
+
return {
|
|
139
|
+
...stripMeta(node),
|
|
140
|
+
type: 'boolean',
|
|
141
|
+
'x-decorator': 'FormItem',
|
|
142
|
+
'x-component': 'Switch',
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
if (type === 'number' || type === 'integer') {
|
|
146
|
+
return {
|
|
147
|
+
...stripMeta(node),
|
|
148
|
+
type: 'number',
|
|
149
|
+
'x-decorator': 'FormItem',
|
|
150
|
+
'x-component': 'NumberPicker',
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (type === 'string') {
|
|
154
|
+
const component = node.enum ? 'Select' : 'Input';
|
|
155
|
+
return {
|
|
156
|
+
...stripMeta(node),
|
|
157
|
+
type: 'string',
|
|
158
|
+
'x-decorator': 'FormItem',
|
|
159
|
+
'x-component': component,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
return { ...stripMeta(node) };
|
|
163
|
+
}
|
|
164
|
+
function stripMeta(node) {
|
|
165
|
+
const { ['x-ui']: _ui, ...rest } = node;
|
|
166
|
+
return { ...rest };
|
|
167
|
+
}
|
|
168
|
+
function getFormilyVoidComponents() {
|
|
169
|
+
return [...VOID_COMPONENTS];
|
|
170
|
+
}
|