@fecommunity/reactpress-cli 0.0.4
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/LICENSE +21 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +102 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +54 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +33 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/restart.d.ts +2 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +29 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +31 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +20 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/stop.d.ts +5 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +29 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/services/config.d.ts +11 -0
- package/dist/services/config.d.ts.map +1 -0
- package/dist/services/config.js +102 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/database.d.ts +43 -0
- package/dist/services/database.d.ts.map +1 -0
- package/dist/services/database.js +252 -0
- package/dist/services/database.js.map +1 -0
- package/dist/services/exec.d.ts +22 -0
- package/dist/services/exec.d.ts.map +1 -0
- package/dist/services/exec.js +46 -0
- package/dist/services/exec.js.map +1 -0
- package/dist/services/init.d.ts +10 -0
- package/dist/services/init.d.ts.map +1 -0
- package/dist/services/init.js +50 -0
- package/dist/services/init.js.map +1 -0
- package/dist/services/process.d.ts +9 -0
- package/dist/services/process.d.ts.map +1 -0
- package/dist/services/process.js +98 -0
- package/dist/services/process.js.map +1 -0
- package/dist/services/server-health.d.ts +4 -0
- package/dist/services/server-health.d.ts.map +1 -0
- package/dist/services/server-health.js +27 -0
- package/dist/services/server-health.js.map +1 -0
- package/dist/services/server.d.ts +19 -0
- package/dist/services/server.d.ts.map +1 -0
- package/dist/services/server.js +133 -0
- package/dist/services/server.js.map +1 -0
- package/dist/templates/config.default.json +12 -0
- package/dist/templates/docker-compose.yml +27 -0
- package/dist/templates/env.default +11 -0
- package/dist/templates/package.json +10 -0
- package/dist/types/config.d.ts +30 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/utils/cli-context.d.ts +4 -0
- package/dist/utils/cli-context.d.ts.map +1 -0
- package/dist/utils/cli-context.js +10 -0
- package/dist/utils/cli-context.js.map +1 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +32 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +27 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/platform.d.ts +8 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +21 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/port.d.ts +5 -0
- package/dist/utils/port.d.ts.map +1 -0
- package/dist/utils/port.js +25 -0
- package/dist/utils/port.js.map +1 -0
- package/dist/utils/server-bundle.d.ts +11 -0
- package/dist/utils/server-bundle.d.ts.map +1 -0
- package/dist/utils/server-bundle.js +71 -0
- package/dist/utils/server-bundle.js.map +1 -0
- package/package.json +69 -0
- package/scripts/install-bundled-runtime.mjs +46 -0
- package/server/bin/reactpress-server.js +203 -0
- package/server/dist/app.module.d.ts +2 -0
- package/server/dist/app.module.js +80 -0
- package/server/dist/app.module.js.map +1 -0
- package/server/dist/filters/http-exception.filter.d.ts +4 -0
- package/server/dist/filters/http-exception.filter.js +36 -0
- package/server/dist/filters/http-exception.filter.js.map +1 -0
- package/server/dist/generate-swagger.d.ts +1 -0
- package/server/dist/generate-swagger.js +73 -0
- package/server/dist/generate-swagger.js.map +1 -0
- package/server/dist/interceptors/transform.interceptor.d.ts +9 -0
- package/server/dist/interceptors/transform.interceptor.js +36 -0
- package/server/dist/interceptors/transform.interceptor.js.map +1 -0
- package/server/dist/logger/index.d.ts +4 -0
- package/server/dist/logger/index.js +33 -0
- package/server/dist/logger/index.js.map +1 -0
- package/server/dist/main.d.ts +6 -0
- package/server/dist/main.js +263 -0
- package/server/dist/main.js.map +1 -0
- package/server/dist/modules/article/article.controller.d.ts +27 -0
- package/server/dist/modules/article/article.controller.js +198 -0
- package/server/dist/modules/article/article.controller.js.map +1 -0
- package/server/dist/modules/article/article.entity.d.ts +23 -0
- package/server/dist/modules/article/article.entity.js +128 -0
- package/server/dist/modules/article/article.entity.js.map +1 -0
- package/server/dist/modules/article/article.module.d.ts +2 -0
- package/server/dist/modules/article/article.module.js +30 -0
- package/server/dist/modules/article/article.module.js.map +1 -0
- package/server/dist/modules/article/article.service.d.ts +30 -0
- package/server/dist/modules/article/article.service.js +303 -0
- package/server/dist/modules/article/article.service.js.map +1 -0
- package/server/dist/modules/article/article.util.d.ts +1 -0
- package/server/dist/modules/article/article.util.js +9 -0
- package/server/dist/modules/article/article.util.js.map +1 -0
- package/server/dist/modules/auth/auth.controller.d.ts +12 -0
- package/server/dist/modules/auth/auth.controller.js +66 -0
- package/server/dist/modules/auth/auth.controller.js.map +1 -0
- package/server/dist/modules/auth/auth.module.d.ts +2 -0
- package/server/dist/modules/auth/auth.module.js +41 -0
- package/server/dist/modules/auth/auth.module.js.map +1 -0
- package/server/dist/modules/auth/auth.service.d.ts +26 -0
- package/server/dist/modules/auth/auth.service.js +127 -0
- package/server/dist/modules/auth/auth.service.js.map +1 -0
- package/server/dist/modules/auth/jwt-auth.guard.d.ts +7 -0
- package/server/dist/modules/auth/jwt-auth.guard.js +29 -0
- package/server/dist/modules/auth/jwt-auth.guard.js.map +1 -0
- package/server/dist/modules/auth/jwt.strategy.d.ts +9 -0
- package/server/dist/modules/auth/jwt.strategy.js +38 -0
- package/server/dist/modules/auth/jwt.strategy.js.map +1 -0
- package/server/dist/modules/auth/roles.guard.d.ts +10 -0
- package/server/dist/modules/auth/roles.guard.js +46 -0
- package/server/dist/modules/auth/roles.guard.js.map +1 -0
- package/server/dist/modules/category/category.controller.d.ts +11 -0
- package/server/dist/modules/category/category.controller.js +91 -0
- package/server/dist/modules/category/category.controller.js.map +1 -0
- package/server/dist/modules/category/category.entity.d.ts +9 -0
- package/server/dist/modules/category/category.entity.js +60 -0
- package/server/dist/modules/category/category.entity.js.map +1 -0
- package/server/dist/modules/category/category.module.d.ts +2 -0
- package/server/dist/modules/category/category.module.js +27 -0
- package/server/dist/modules/category/category.module.js.map +1 -0
- package/server/dist/modules/category/category.service.d.ts +12 -0
- package/server/dist/modules/category/category.service.js +89 -0
- package/server/dist/modules/category/category.service.js.map +1 -0
- package/server/dist/modules/comment/comment.controller.d.ts +12 -0
- package/server/dist/modules/comment/comment.controller.js +100 -0
- package/server/dist/modules/comment/comment.controller.js.map +1 -0
- package/server/dist/modules/comment/comment.entity.d.ts +17 -0
- package/server/dist/modules/comment/comment.entity.js +104 -0
- package/server/dist/modules/comment/comment.entity.js.map +1 -0
- package/server/dist/modules/comment/comment.module.d.ts +2 -0
- package/server/dist/modules/comment/comment.module.js +30 -0
- package/server/dist/modules/comment/comment.module.js.map +1 -0
- package/server/dist/modules/comment/comment.service.d.ts +24 -0
- package/server/dist/modules/comment/comment.service.js +172 -0
- package/server/dist/modules/comment/comment.service.js.map +1 -0
- package/server/dist/modules/comment/html.d.ts +15 -0
- package/server/dist/modules/comment/html.js +632 -0
- package/server/dist/modules/comment/html.js.map +1 -0
- package/server/dist/modules/file/file.controller.d.ts +10 -0
- package/server/dist/modules/file/file.controller.js +84 -0
- package/server/dist/modules/file/file.controller.js.map +1 -0
- package/server/dist/modules/file/file.entity.d.ts +9 -0
- package/server/dist/modules/file/file.entity.js +60 -0
- package/server/dist/modules/file/file.entity.js.map +1 -0
- package/server/dist/modules/file/file.module.d.ts +2 -0
- package/server/dist/modules/file/file.module.js +27 -0
- package/server/dist/modules/file/file.module.js.map +1 -0
- package/server/dist/modules/file/file.service.d.ts +17 -0
- package/server/dist/modules/file/file.service.js +111 -0
- package/server/dist/modules/file/file.service.js.map +1 -0
- package/server/dist/modules/install/install.controller.d.ts +11 -0
- package/server/dist/modules/install/install.controller.js +49 -0
- package/server/dist/modules/install/install.controller.js.map +1 -0
- package/server/dist/modules/install/install.module.d.ts +2 -0
- package/server/dist/modules/install/install.module.js +26 -0
- package/server/dist/modules/install/install.module.js.map +1 -0
- package/server/dist/modules/install/install.service.d.ts +12 -0
- package/server/dist/modules/install/install.service.js +63 -0
- package/server/dist/modules/install/install.service.js.map +1 -0
- package/server/dist/modules/knowledge/knowledge.controller.d.ts +14 -0
- package/server/dist/modules/knowledge/knowledge.controller.js +128 -0
- package/server/dist/modules/knowledge/knowledge.controller.js.map +1 -0
- package/server/dist/modules/knowledge/knowledge.entity.d.ts +18 -0
- package/server/dist/modules/knowledge/knowledge.entity.js +109 -0
- package/server/dist/modules/knowledge/knowledge.entity.js.map +1 -0
- package/server/dist/modules/knowledge/knowledge.module.d.ts +2 -0
- package/server/dist/modules/knowledge/knowledge.module.js +27 -0
- package/server/dist/modules/knowledge/knowledge.module.js.map +1 -0
- package/server/dist/modules/knowledge/knowledge.service.d.ts +14 -0
- package/server/dist/modules/knowledge/knowledge.service.js +143 -0
- package/server/dist/modules/knowledge/knowledge.service.js.map +1 -0
- package/server/dist/modules/page/page.controller.d.ts +12 -0
- package/server/dist/modules/page/page.controller.js +102 -0
- package/server/dist/modules/page/page.controller.js.map +1 -0
- package/server/dist/modules/page/page.entity.d.ts +15 -0
- package/server/dist/modules/page/page.entity.js +94 -0
- package/server/dist/modules/page/page.entity.js.map +1 -0
- package/server/dist/modules/page/page.module.d.ts +2 -0
- package/server/dist/modules/page/page.module.js +27 -0
- package/server/dist/modules/page/page.module.js.map +1 -0
- package/server/dist/modules/page/page.service.d.ts +12 -0
- package/server/dist/modules/page/page.service.js +97 -0
- package/server/dist/modules/page/page.service.js.map +1 -0
- package/server/dist/modules/search/search.controller.d.ts +8 -0
- package/server/dist/modules/search/search.controller.js +67 -0
- package/server/dist/modules/search/search.controller.js.map +1 -0
- package/server/dist/modules/search/search.entity.d.ts +8 -0
- package/server/dist/modules/search/search.entity.js +59 -0
- package/server/dist/modules/search/search.entity.js.map +1 -0
- package/server/dist/modules/search/search.module.d.ts +2 -0
- package/server/dist/modules/search/search.module.js +27 -0
- package/server/dist/modules/search/search.module.js.map +1 -0
- package/server/dist/modules/search/search.service.d.ts +12 -0
- package/server/dist/modules/search/search.service.js +84 -0
- package/server/dist/modules/search/search.service.js.map +1 -0
- package/server/dist/modules/setting/setting.constant.d.ts +3 -0
- package/server/dist/modules/setting/setting.constant.js +25 -0
- package/server/dist/modules/setting/setting.constant.js.map +1 -0
- package/server/dist/modules/setting/setting.controller.d.ts +12 -0
- package/server/dist/modules/setting/setting.controller.js +77 -0
- package/server/dist/modules/setting/setting.controller.js.map +1 -0
- package/server/dist/modules/setting/setting.entity.d.ts +26 -0
- package/server/dist/modules/setting/setting.entity.js +149 -0
- package/server/dist/modules/setting/setting.entity.js.map +1 -0
- package/server/dist/modules/setting/setting.module.d.ts +2 -0
- package/server/dist/modules/setting/setting.module.js +28 -0
- package/server/dist/modules/setting/setting.module.js.map +1 -0
- package/server/dist/modules/setting/setting.service.d.ts +10 -0
- package/server/dist/modules/setting/setting.service.js +106 -0
- package/server/dist/modules/setting/setting.service.js.map +1 -0
- package/server/dist/modules/smtp/mail.util.d.ts +6 -0
- package/server/dist/modules/smtp/mail.util.js +33 -0
- package/server/dist/modules/smtp/mail.util.js.map +1 -0
- package/server/dist/modules/smtp/smtp.controller.d.ts +9 -0
- package/server/dist/modules/smtp/smtp.controller.js +69 -0
- package/server/dist/modules/smtp/smtp.controller.js.map +1 -0
- package/server/dist/modules/smtp/smtp.entity.d.ts +9 -0
- package/server/dist/modules/smtp/smtp.entity.js +60 -0
- package/server/dist/modules/smtp/smtp.entity.js.map +1 -0
- package/server/dist/modules/smtp/smtp.module.d.ts +2 -0
- package/server/dist/modules/smtp/smtp.module.js +28 -0
- package/server/dist/modules/smtp/smtp.module.js.map +1 -0
- package/server/dist/modules/smtp/smtp.service.d.ts +11 -0
- package/server/dist/modules/smtp/smtp.service.js +82 -0
- package/server/dist/modules/smtp/smtp.service.js.map +1 -0
- package/server/dist/modules/tag/tag.controller.d.ts +12 -0
- package/server/dist/modules/tag/tag.controller.js +101 -0
- package/server/dist/modules/tag/tag.controller.js.map +1 -0
- package/server/dist/modules/tag/tag.entity.d.ts +9 -0
- package/server/dist/modules/tag/tag.entity.js +59 -0
- package/server/dist/modules/tag/tag.entity.js.map +1 -0
- package/server/dist/modules/tag/tag.module.d.ts +2 -0
- package/server/dist/modules/tag/tag.module.js +27 -0
- package/server/dist/modules/tag/tag.module.js.map +1 -0
- package/server/dist/modules/tag/tag.service.d.ts +13 -0
- package/server/dist/modules/tag/tag.service.js +103 -0
- package/server/dist/modules/tag/tag.service.js.map +1 -0
- package/server/dist/modules/user/user.controller.d.ts +13 -0
- package/server/dist/modules/user/user.controller.js +114 -0
- package/server/dist/modules/user/user.controller.js.map +1 -0
- package/server/dist/modules/user/user.entity.d.ts +15 -0
- package/server/dist/modules/user/user.entity.js +96 -0
- package/server/dist/modules/user/user.entity.js.map +1 -0
- package/server/dist/modules/user/user.module.d.ts +2 -0
- package/server/dist/modules/user/user.module.js +28 -0
- package/server/dist/modules/user/user.module.js.map +1 -0
- package/server/dist/modules/user/user.service.d.ts +16 -0
- package/server/dist/modules/user/user.service.js +151 -0
- package/server/dist/modules/user/user.service.js.map +1 -0
- package/server/dist/modules/view/view.controller.d.ts +11 -0
- package/server/dist/modules/view/view.controller.js +92 -0
- package/server/dist/modules/view/view.controller.js.map +1 -0
- package/server/dist/modules/view/view.entity.d.ts +14 -0
- package/server/dist/modules/view/view.entity.js +88 -0
- package/server/dist/modules/view/view.entity.js.map +1 -0
- package/server/dist/modules/view/view.module.d.ts +2 -0
- package/server/dist/modules/view/view.module.js +27 -0
- package/server/dist/modules/view/view.module.js.map +1 -0
- package/server/dist/modules/view/view.service.d.ts +11 -0
- package/server/dist/modules/view/view.service.js +89 -0
- package/server/dist/modules/view/view.service.js.map +1 -0
- package/server/dist/public/favicon.png +0 -0
- package/server/dist/public/index.html +439 -0
- package/server/dist/public/swagger/custom.css +11 -0
- package/server/dist/starter.d.ts +1 -0
- package/server/dist/starter.js +84 -0
- package/server/dist/starter.js.map +1 -0
- package/server/dist/tsconfig.build.tsbuildinfo +16764 -0
- package/server/dist/utils/date.util.d.ts +1 -0
- package/server/dist/utils/date.util.js +13 -0
- package/server/dist/utils/date.util.js.map +1 -0
- package/server/dist/utils/ip.util.d.ts +2 -0
- package/server/dist/utils/ip.util.js +27 -0
- package/server/dist/utils/ip.util.js.map +1 -0
- package/server/dist/utils/markdown.util.d.ts +4 -0
- package/server/dist/utils/markdown.util.js +42 -0
- package/server/dist/utils/markdown.util.js.map +1 -0
- package/server/dist/utils/oss/aliyun-oss-client.d.ts +6 -0
- package/server/dist/utils/oss/aliyun-oss-client.js +28 -0
- package/server/dist/utils/oss/aliyun-oss-client.js.map +1 -0
- package/server/dist/utils/oss/oss-client.d.ts +6 -0
- package/server/dist/utils/oss/oss-client.js +10 -0
- package/server/dist/utils/oss/oss-client.js.map +1 -0
- package/server/dist/utils/oss.util.d.ts +13 -0
- package/server/dist/utils/oss.util.js +48 -0
- package/server/dist/utils/oss.util.js.map +1 -0
- package/server/dist/utils/ua.util.d.ts +9 -0
- package/server/dist/utils/ua.util.js +36 -0
- package/server/dist/utils/ua.util.js.map +1 -0
- package/server/dist/utils/uniqueid.util.d.ts +1 -0
- package/server/dist/utils/uniqueid.util.js +9 -0
- package/server/dist/utils/uniqueid.util.js.map +1 -0
- package/server/dist/utils/upload.util.d.ts +5 -0
- package/server/dist/utils/upload.util.js +34 -0
- package/server/dist/utils/upload.util.js.map +1 -0
- package/server/dist/utils/user.util.d.ts +1 -0
- package/server/dist/utils/user.util.js +18 -0
- package/server/dist/utils/user.util.js.map +1 -0
- package/server/ecosystem.config.js +18 -0
- package/server/package.json +149 -0
- package/server/public/favicon.png +0 -0
- package/server/public/index.html +439 -0
- package/server/public/swagger/custom.css +11 -0
- package/templates/config.default.json +12 -0
- package/templates/docker-compose.yml +27 -0
- package/templates/env.default +11 -0
- package/templates/package.json +10 -0
- package/toolkit/dist/api/Article.d.ts +123 -0
- package/toolkit/dist/api/Article.js +188 -0
- package/toolkit/dist/api/Auth.d.ts +32 -0
- package/toolkit/dist/api/Auth.js +58 -0
- package/toolkit/dist/api/Category.d.ts +51 -0
- package/toolkit/dist/api/Category.js +84 -0
- package/toolkit/dist/api/Comment.d.ts +60 -0
- package/toolkit/dist/api/Comment.js +97 -0
- package/toolkit/dist/api/File.d.ts +42 -0
- package/toolkit/dist/api/File.js +71 -0
- package/toolkit/dist/api/HttpClient.d.ts +41 -0
- package/toolkit/dist/api/HttpClient.js +96 -0
- package/toolkit/dist/api/Knowledge.d.ts +78 -0
- package/toolkit/dist/api/Knowledge.js +123 -0
- package/toolkit/dist/api/Page.d.ts +60 -0
- package/toolkit/dist/api/Page.js +97 -0
- package/toolkit/dist/api/Search.d.ts +32 -0
- package/toolkit/dist/api/Search.js +58 -0
- package/toolkit/dist/api/Setting.d.ts +24 -0
- package/toolkit/dist/api/Setting.js +45 -0
- package/toolkit/dist/api/Smtp.d.ts +33 -0
- package/toolkit/dist/api/Smtp.js +58 -0
- package/toolkit/dist/api/Tag.d.ts +60 -0
- package/toolkit/dist/api/Tag.js +97 -0
- package/toolkit/dist/api/User.d.ts +43 -0
- package/toolkit/dist/api/User.js +72 -0
- package/toolkit/dist/api/View.d.ts +51 -0
- package/toolkit/dist/api/View.js +84 -0
- package/toolkit/dist/api/index.d.ts +13 -0
- package/toolkit/dist/api/index.js +30 -0
- package/toolkit/dist/api/instance.d.ts +47 -0
- package/toolkit/dist/api/instance.js +71 -0
- package/toolkit/dist/config/env.d.ts +1 -0
- package/toolkit/dist/config/env.js +89 -0
- package/toolkit/dist/config/global.d.ts +34 -0
- package/toolkit/dist/config/global.js +382 -0
- package/toolkit/dist/config/i18n.d.ts +4 -0
- package/toolkit/dist/config/i18n.js +43 -0
- package/toolkit/dist/config/index.d.ts +15 -0
- package/toolkit/dist/config/index.js +25 -0
- package/toolkit/dist/index.d.ts +11 -0
- package/toolkit/dist/index.js +38 -0
- package/toolkit/dist/locales/en.json +97 -0
- package/toolkit/dist/locales/zh.json +97 -0
- package/toolkit/dist/types/index.d.ts +245 -0
- package/toolkit/dist/types/index.js +12 -0
- package/toolkit/dist/utils/index.d.ts +33 -0
- package/toolkit/dist/utils/index.js +59 -0
- package/toolkit/package.json +19 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var _a;
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.config = exports.file = void 0;
|
|
24
|
+
const fs = __importStar(require("fs-extra"));
|
|
25
|
+
const path = __importStar(require("path"));
|
|
26
|
+
const dotenv = __importStar(require("dotenv"));
|
|
27
|
+
const isProd = process.env.NODE_ENV === 'production';
|
|
28
|
+
// 获取项目根目录的函数
|
|
29
|
+
function getProjectRoot() {
|
|
30
|
+
// 优先使用通过环境变量传递的原始工作目录
|
|
31
|
+
// 这是在 bin/reactpress-server.js 中设置的,表示用户执行 npx 命令的目录
|
|
32
|
+
if (process.env.REACTPRESS_ORIGINAL_CWD) {
|
|
33
|
+
return process.env.REACTPRESS_ORIGINAL_CWD;
|
|
34
|
+
}
|
|
35
|
+
// 如果没有设置环境变量,则回退到当前工作目录
|
|
36
|
+
return process.cwd();
|
|
37
|
+
}
|
|
38
|
+
function parseEnv() {
|
|
39
|
+
// 使用改进的项目根目录查找
|
|
40
|
+
const projectRoot = getProjectRoot();
|
|
41
|
+
const possibleBasePaths = [
|
|
42
|
+
projectRoot,
|
|
43
|
+
path.resolve(__dirname, '../../'),
|
|
44
|
+
path.resolve(__dirname, '../../../'),
|
|
45
|
+
path.resolve(__dirname, '../'),
|
|
46
|
+
process.cwd(),
|
|
47
|
+
path.resolve(process.cwd(), '../'),
|
|
48
|
+
];
|
|
49
|
+
let foundEnvFiles = [];
|
|
50
|
+
// Search for .env files in all possible locations
|
|
51
|
+
for (const basePath of possibleBasePaths) {
|
|
52
|
+
const localenv = path.join(basePath, '.env');
|
|
53
|
+
const prodenv = path.join(basePath, '.env.prod');
|
|
54
|
+
const envFiles = [
|
|
55
|
+
{ path: prodenv, isProd: true },
|
|
56
|
+
{ path: localenv, isProd: false }
|
|
57
|
+
];
|
|
58
|
+
const availableEnvFiles = envFiles.filter(({ path: envPath }) => fs.existsSync(envPath));
|
|
59
|
+
if (availableEnvFiles.length > 0) {
|
|
60
|
+
foundEnvFiles = availableEnvFiles;
|
|
61
|
+
break; // Use the first location where we find env files
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (foundEnvFiles.length === 0) {
|
|
65
|
+
// Show all possible paths in error message for debugging
|
|
66
|
+
const allPossiblePaths = [];
|
|
67
|
+
for (const basePath of possibleBasePaths) {
|
|
68
|
+
allPossiblePaths.push(path.join(basePath, '.env'));
|
|
69
|
+
allPossiblePaths.push(path.join(basePath, '.env.prod'));
|
|
70
|
+
}
|
|
71
|
+
throw new Error(`No environment file found. Searched in these locations:\n` +
|
|
72
|
+
allPossiblePaths.map((p) => `- ${p}`).join('\n') +
|
|
73
|
+
`\n\nPlease create a .env file in your project root directory.`);
|
|
74
|
+
}
|
|
75
|
+
const file = foundEnvFiles.find(({ isProd: prod }) => isProd === prod)?.path ||
|
|
76
|
+
foundEnvFiles[0].path;
|
|
77
|
+
try {
|
|
78
|
+
const envContent = fs.readFileSync(file, 'utf8');
|
|
79
|
+
const config = dotenv.parse(envContent);
|
|
80
|
+
if (Object.keys(config).length === 0) {
|
|
81
|
+
console.warn(`Warning: No environment variables found in ${file}`);
|
|
82
|
+
}
|
|
83
|
+
return { file, config };
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
throw new Error(`Failed to parse ${file}: ${error instanceof Error ? error.message : String(error)}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
_a = parseEnv(), exports.file = _a.file, exports.config = _a.config;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface NavItem {
|
|
2
|
+
label: string;
|
|
3
|
+
key: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
children?: NavItem[];
|
|
10
|
+
}
|
|
11
|
+
interface NavConfig {
|
|
12
|
+
categories: NavItem[];
|
|
13
|
+
subCategories: Record<string, NavItem[]>;
|
|
14
|
+
}
|
|
15
|
+
interface UrlCategory {
|
|
16
|
+
key: string;
|
|
17
|
+
label: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
children: NavItem[];
|
|
20
|
+
}
|
|
21
|
+
interface GlobalConfig {
|
|
22
|
+
navConfig: NavConfig;
|
|
23
|
+
urlConfig: UrlCategory[];
|
|
24
|
+
}
|
|
25
|
+
interface LanguageConfig {
|
|
26
|
+
globalConfig: GlobalConfig;
|
|
27
|
+
}
|
|
28
|
+
interface GlobalSetting {
|
|
29
|
+
zh: LanguageConfig;
|
|
30
|
+
en: LanguageConfig;
|
|
31
|
+
}
|
|
32
|
+
declare const globalSetting: GlobalSetting;
|
|
33
|
+
export type { GlobalSetting, LanguageConfig, GlobalConfig, NavConfig, NavItem, UrlCategory };
|
|
34
|
+
export { globalSetting };
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.globalSetting = void 0;
|
|
4
|
+
const navConfig = {
|
|
5
|
+
categories: [
|
|
6
|
+
{
|
|
7
|
+
label: '站内',
|
|
8
|
+
key: 'local',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
label: '搜索',
|
|
12
|
+
key: 'search',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: '工具',
|
|
16
|
+
key: 'tools',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: '社区',
|
|
20
|
+
key: 'community',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: '求职',
|
|
24
|
+
key: 'job',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
subCategories: {
|
|
28
|
+
search: [
|
|
29
|
+
{
|
|
30
|
+
label: '百度',
|
|
31
|
+
key: 'search-baidu',
|
|
32
|
+
url: 'https://www.baidu.com/s?wd=',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Bing',
|
|
36
|
+
key: 'search-bing',
|
|
37
|
+
url: 'https://cn.bing.com/search?q=',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'Google',
|
|
41
|
+
key: 'search-google',
|
|
42
|
+
url: 'https://www.google.com/search?q=',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: '搜狗',
|
|
46
|
+
key: 'search-sougou',
|
|
47
|
+
url: 'https://www.sogou.com/web?query=',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
tools: [
|
|
51
|
+
{
|
|
52
|
+
label: '权重查询',
|
|
53
|
+
key: 'tools-quanzhong',
|
|
54
|
+
url: 'https://rank.chinaz.com/all/',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: 'SEO查询',
|
|
58
|
+
key: 'tools-seo',
|
|
59
|
+
url: 'https://seo.chinaz.com/',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: '关键词查询',
|
|
63
|
+
key: 'tools-keyword',
|
|
64
|
+
url: 'https://www.5118.com/seo/newrelated/',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
community: [
|
|
68
|
+
{
|
|
69
|
+
label: 'Github',
|
|
70
|
+
key: 'community-github',
|
|
71
|
+
url: 'https://github.com/search?type=repositories&q=',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: '掘金',
|
|
75
|
+
key: 'community-juejin',
|
|
76
|
+
url: 'https://juejin.cn/search?type=0&query=',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: '知乎',
|
|
80
|
+
key: 'community-zhihu',
|
|
81
|
+
url: 'https://www.zhihu.com/search?type=content&q=',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: '豆瓣',
|
|
85
|
+
key: 'community-douban',
|
|
86
|
+
url: 'https://www.douban.com/search?q=',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
job: [
|
|
90
|
+
{
|
|
91
|
+
label: 'BOSS直聘',
|
|
92
|
+
key: 'job-boss',
|
|
93
|
+
url: 'https://www.zhipin.com/web/geek/job?query=',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: '智联招聘',
|
|
97
|
+
key: 'job-zhilian',
|
|
98
|
+
url: 'https://sou.zhaopin.com/jobs/searchresult.ashx?kw=',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: '前程无优',
|
|
102
|
+
key: 'job-51job',
|
|
103
|
+
url: 'https://we.51job.com/pc/search?searchType=2&sortType=0&keyword=',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: '拉钩网',
|
|
107
|
+
key: 'job-lagou',
|
|
108
|
+
url: 'https://www.lagou.com/jobs/list_',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: '猎聘网',
|
|
112
|
+
key: 'job-liepin',
|
|
113
|
+
url: 'https://www.liepin.com/zhaopin/?key=',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
const urlConfig = [
|
|
119
|
+
{
|
|
120
|
+
key: 'hot-site',
|
|
121
|
+
label: '热门网址',
|
|
122
|
+
icon: 'GlobalOutlined',
|
|
123
|
+
children: [
|
|
124
|
+
{
|
|
125
|
+
key: 'search_baidu',
|
|
126
|
+
label: '百度',
|
|
127
|
+
type: '搜索引擎',
|
|
128
|
+
description: '全球最大的中文搜索引擎,提供全面的网页搜索、图片搜索、视频搜索等服务。',
|
|
129
|
+
url: 'https://www.baidu.com',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: 'social_weibo',
|
|
133
|
+
label: '微博',
|
|
134
|
+
type: '社交媒体',
|
|
135
|
+
description: '中国知名的社交媒体平台,提供短文本、图片、视频等内容的发布与分享。',
|
|
136
|
+
url: 'https://weibo.com',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
key: 'ecommerce_taobao',
|
|
140
|
+
label: '淘宝',
|
|
141
|
+
type: '电商平台',
|
|
142
|
+
description: '中国最大的在线购物平台,提供各类商品的购买服务。',
|
|
143
|
+
url: 'https://www.taobao.com',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
key: 'ecommerce_jd',
|
|
147
|
+
label: '京东',
|
|
148
|
+
type: '电商平台',
|
|
149
|
+
description: '中国知名的电商平台,以自营和第三方商家入驻为主,提供正品保障。',
|
|
150
|
+
url: 'https://www.jd.com',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
key: 'video_iqiyi',
|
|
154
|
+
label: '爱奇艺',
|
|
155
|
+
type: '视频网站',
|
|
156
|
+
description: '中国领先的高清视频网站,提供电影、电视剧、综艺等内容的在线观看。',
|
|
157
|
+
url: 'https://www.iqiyi.com',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
key: 'video_bilibili',
|
|
161
|
+
label: '哔哩哔哩',
|
|
162
|
+
type: '视频网站',
|
|
163
|
+
description: '中国知名的弹幕视频网站,以ACG文化为主,提供视频创作与分享平台。',
|
|
164
|
+
url: 'https://www.bilibili.com',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
key: 'news_sina',
|
|
168
|
+
label: '新浪新闻',
|
|
169
|
+
type: '新闻',
|
|
170
|
+
description: '中国知名的新闻门户网站,提供国内外新闻、财经、体育等资讯。',
|
|
171
|
+
url: 'https://news.sina.com.cn',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
key: 'travel_ctrip',
|
|
175
|
+
label: '携程旅行',
|
|
176
|
+
type: '旅行服务',
|
|
177
|
+
description: '中国领先的在线旅行服务公司,提供机票、酒店、度假等预订服务。',
|
|
178
|
+
url: 'https://www.ctrip.com',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: 'music_tencent',
|
|
182
|
+
label: 'QQ音乐',
|
|
183
|
+
type: '音乐服务',
|
|
184
|
+
description: '腾讯旗下的音乐播放平台,提供海量音乐资源、歌单推荐和社交功能。',
|
|
185
|
+
url: 'https://y.qq.com',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
key: 'knowledge_douban',
|
|
189
|
+
label: '豆瓣',
|
|
190
|
+
type: '知识社区',
|
|
191
|
+
description: '中国知名的文化、艺术和书籍评论社区,提供书籍、电影、音乐等内容的评分与评论。',
|
|
192
|
+
url: 'https://www.douban.com',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
key: 'map_baidu_map',
|
|
196
|
+
label: '百度地图',
|
|
197
|
+
type: '地图服务',
|
|
198
|
+
description: '中国领先的在线地图服务,提供导航、定位、周边搜索等功能。',
|
|
199
|
+
url: 'https://map.baidu.com',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
key: 'knowledge_zhihu',
|
|
203
|
+
label: '知乎',
|
|
204
|
+
type: '问答社区',
|
|
205
|
+
description: '中国最大的问答社区,用户可以在此分享知识、经验和见解,并找到问题的答案。',
|
|
206
|
+
url: 'https://www.zhihu.com',
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: 'online-tools',
|
|
212
|
+
label: '在线工具',
|
|
213
|
+
icon: 'ToolOutlined',
|
|
214
|
+
children: [
|
|
215
|
+
{
|
|
216
|
+
key: 'code_github',
|
|
217
|
+
label: 'GitHub',
|
|
218
|
+
type: '代码托管平台',
|
|
219
|
+
description: '全球最大的代码托管平台,支持协作开发、版本控制、代码审查等功能。',
|
|
220
|
+
url: 'https://github.com',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
key: 'webmaster_tool',
|
|
224
|
+
label: '站长工具',
|
|
225
|
+
type: '网站管理工具集合',
|
|
226
|
+
description: '提供SEO查询、网站检测、关键词挖掘等多种工具,帮助站长优化网站。',
|
|
227
|
+
url: 'https://tool.chinaz.com',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
key: 'excel_to_json_converter',
|
|
231
|
+
label: 'Excel转换JSON',
|
|
232
|
+
type: '数据转换工具',
|
|
233
|
+
description: '用于将Excel文件转换为JSON格式的在线工具,便于在Web应用程序中使用。',
|
|
234
|
+
icon: 'https://www.convertio.co/favicon.ico',
|
|
235
|
+
url: 'https://www.convertio.co/zh/excel-json/',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
key: 'chuangkit',
|
|
239
|
+
label: '创可贴',
|
|
240
|
+
description: '在线平面设计工具网站,提供丰富的海报、PPT、新媒体配图等模板素材,适合零基础设计小白和需要经常出设计图的人。',
|
|
241
|
+
url: 'https://www.chuangkit.com',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
key: 'shimo',
|
|
245
|
+
label: '石墨文档',
|
|
246
|
+
description: '远程在线办公/协作文档,支持多终端使用,包括文档、表格和PPT,文件自动保存,可通过链接分享文件。',
|
|
247
|
+
url: 'https://shimo.im',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
key: 'yasuo_pdf',
|
|
251
|
+
label: '压缩啦',
|
|
252
|
+
description: '在线压缩网址,支持PDF、图片和视频压缩,压缩后清晰度高度还原,还支持在线解压。',
|
|
253
|
+
url: 'https://yasuo.xunjiepdf.com',
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
key: 'gaoding',
|
|
257
|
+
label: '稿定设计',
|
|
258
|
+
description: '在线平面设计网站,提供丰富设计模板和在线辅助功能,如在线PS、拼图和抠图。',
|
|
259
|
+
url: 'https://www.gaoding.com',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
key: 'cli',
|
|
263
|
+
label: '草料二维码',
|
|
264
|
+
description: '在线二维码生成器网站,支持多种样式,可插入logo增加辨识度。',
|
|
265
|
+
url: 'https://www.cli.im',
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
key: 'mubu',
|
|
269
|
+
label: '幕布',
|
|
270
|
+
description: '在线思维概要整理工具网站,支持多终端使用和多种通讯软件分享,大纲笔记与思维导图支持一键转换。',
|
|
271
|
+
url: 'https://www.mubu.com',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
key: 'woodo',
|
|
275
|
+
label: 'Woodo',
|
|
276
|
+
description: '在线专业PPT制作网站,提供大量PPT模板,适合工作总结汇报、营销策划等多种场景。',
|
|
277
|
+
url: 'https://www.woodo.cn',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
key: 'bigjpg',
|
|
281
|
+
label: 'AI人工智能图片放大',
|
|
282
|
+
description: '使用最新人工智能深度学习技术——深度卷积神经网络。它会将噪点和锯齿的部分进行补充,实现图片的无损放大,支持最大16倍放大。',
|
|
283
|
+
url: 'https://bigjpg.com',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
key: 'tool-lu',
|
|
287
|
+
label: '程序员的工具箱',
|
|
288
|
+
description: '在线运行代码,时间戳,格式转换,代码着色,APP icon制作,应有尽有。',
|
|
289
|
+
url: 'https://tool.lu',
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
key: 'front-end-dev',
|
|
295
|
+
label: '编程开发',
|
|
296
|
+
icon: 'CodeOutlined',
|
|
297
|
+
children: [
|
|
298
|
+
{
|
|
299
|
+
key: 'github',
|
|
300
|
+
label: '代码托管与协作',
|
|
301
|
+
title: 'GitHub',
|
|
302
|
+
description: '面向开源及私有软件项目的托管平台,支持Git版本控制,提供订阅、讨论组、文本渲染、在线文件编辑器等功能。',
|
|
303
|
+
url: 'https://github.com/',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
key: 'stackoverflow',
|
|
307
|
+
label: '技术问答社区',
|
|
308
|
+
title: 'Stack Overflow',
|
|
309
|
+
description: '一个程序员和编程爱好者交流技术、互相帮助的IT技术问答网站。',
|
|
310
|
+
url: 'https://stackoverflow.com/',
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
key: 'leetcode',
|
|
314
|
+
label: '编程题库与练习',
|
|
315
|
+
title: 'LeetCode',
|
|
316
|
+
description: '在线编程题库,提供大量编程题目,支持多种编程语言,适合不同水平的程序员进行练习。',
|
|
317
|
+
url: 'https://leetcode.com/',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
key: 'csdn',
|
|
321
|
+
label: 'IT技术社区与资源',
|
|
322
|
+
title: 'CSDN',
|
|
323
|
+
description: '中国专业IT社区,提供IT资讯、技术教程、软件开发、考试认证、IT培训等资源。',
|
|
324
|
+
url: 'https://www.csdn.net/',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
key: 'w3schools',
|
|
328
|
+
label: 'Web技术教程',
|
|
329
|
+
title: 'W3Schools',
|
|
330
|
+
description: '提供Web技术教程的网站,包括HTML、CSS、JavaScript、PHP、SQL等。',
|
|
331
|
+
url: 'https://www.w3schools.com/',
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
key: 'codesandbox',
|
|
335
|
+
label: '在线代码编辑器',
|
|
336
|
+
title: 'CodeSandbox',
|
|
337
|
+
description: '在线代码编辑器,支持多种前端技术栈,方便开发者进行代码演示和分享。',
|
|
338
|
+
url: 'https://codesandbox.io/',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
key: 'jsonplaceholder',
|
|
342
|
+
label: '假数据服务',
|
|
343
|
+
title: 'JSONPlaceholder',
|
|
344
|
+
description: '提供假数据的在线服务,用于前端开发和测试,提供多种类型的假数据接口。',
|
|
345
|
+
url: 'https://jsonplaceholder.typicode.com/',
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
key: 'nodejs-org',
|
|
349
|
+
label: 'Node.js官方网站',
|
|
350
|
+
title: 'Node.js',
|
|
351
|
+
description: 'Node.js的官方网站,提供了Node.js的下载、文档、社区和生态系统信息。',
|
|
352
|
+
url: 'https://nodejs.org/',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
key: 'reactjs-org',
|
|
356
|
+
label: 'React官方网站',
|
|
357
|
+
title: 'React',
|
|
358
|
+
description: 'React的官方网站,提供了React的文档、教程、社区和生态系统资源。',
|
|
359
|
+
url: 'https://reactjs.org/',
|
|
360
|
+
},
|
|
361
|
+
],
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
const zh = {
|
|
365
|
+
globalConfig: {
|
|
366
|
+
navConfig,
|
|
367
|
+
urlConfig,
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
// TODO: 需要为英文环境创建专门的配置
|
|
371
|
+
// 当前英文配置只是复制了中文配置,需要根据实际需求调整
|
|
372
|
+
const en = {
|
|
373
|
+
globalConfig: {
|
|
374
|
+
navConfig,
|
|
375
|
+
urlConfig,
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
const globalSetting = {
|
|
379
|
+
zh,
|
|
380
|
+
en,
|
|
381
|
+
};
|
|
382
|
+
exports.globalSetting = globalSetting;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var _a;
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.defaultLocale = exports.locales = exports.messages = void 0;
|
|
24
|
+
const fs = __importStar(require("fs-extra"));
|
|
25
|
+
const path = __importStar(require("path"));
|
|
26
|
+
function parseI18n() {
|
|
27
|
+
// Locales are now in the dist directory, one level up from config
|
|
28
|
+
const localesDir = path.join(__dirname, '../locales');
|
|
29
|
+
if (!fs.existsSync(localesDir)) {
|
|
30
|
+
return { messages: {}, locales: [], defaultLocale: '' };
|
|
31
|
+
}
|
|
32
|
+
const files = fs.readdirSync(localesDir);
|
|
33
|
+
const messages = files.reduce((i18n, file) => {
|
|
34
|
+
const language = file.replace(path.extname(file), '');
|
|
35
|
+
const json = fs.readJsonSync(path.join(localesDir, file));
|
|
36
|
+
i18n[language] = json;
|
|
37
|
+
return i18n;
|
|
38
|
+
}, {});
|
|
39
|
+
const locales = Object.keys(messages);
|
|
40
|
+
const defaultLocale = 'zh' in messages ? 'zh' : locales[0];
|
|
41
|
+
return { messages, locales, defaultLocale };
|
|
42
|
+
}
|
|
43
|
+
_a = parseI18n(), exports.messages = _a.messages, exports.locales = _a.locales, exports.defaultLocale = _a.defaultLocale;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 环境变量配置
|
|
3
|
+
*/
|
|
4
|
+
import { file } from './env';
|
|
5
|
+
import { messages, locales, defaultLocale } from './i18n';
|
|
6
|
+
import { globalSetting } from './global';
|
|
7
|
+
declare const config: {
|
|
8
|
+
locales: string[];
|
|
9
|
+
defaultLocale: string;
|
|
10
|
+
messages: import("./i18n").I18nMessages;
|
|
11
|
+
globalSetting: import("./global").GlobalSetting;
|
|
12
|
+
file: string;
|
|
13
|
+
};
|
|
14
|
+
export { config, file, messages, locales, defaultLocale, globalSetting };
|
|
15
|
+
export default config;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.globalSetting = exports.defaultLocale = exports.locales = exports.messages = exports.file = exports.config = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 环境变量配置
|
|
6
|
+
*/
|
|
7
|
+
const env_1 = require("./env");
|
|
8
|
+
Object.defineProperty(exports, "file", { enumerable: true, get: function () { return env_1.file; } });
|
|
9
|
+
const i18n_1 = require("./i18n");
|
|
10
|
+
Object.defineProperty(exports, "messages", { enumerable: true, get: function () { return i18n_1.messages; } });
|
|
11
|
+
Object.defineProperty(exports, "locales", { enumerable: true, get: function () { return i18n_1.locales; } });
|
|
12
|
+
Object.defineProperty(exports, "defaultLocale", { enumerable: true, get: function () { return i18n_1.defaultLocale; } });
|
|
13
|
+
const global_1 = require("./global");
|
|
14
|
+
Object.defineProperty(exports, "globalSetting", { enumerable: true, get: function () { return global_1.globalSetting; } });
|
|
15
|
+
// Create a unified config object that includes all configuration properties
|
|
16
|
+
const config = {
|
|
17
|
+
...env_1.config,
|
|
18
|
+
locales: i18n_1.locales,
|
|
19
|
+
defaultLocale: i18n_1.defaultLocale,
|
|
20
|
+
messages: i18n_1.messages,
|
|
21
|
+
globalSetting: global_1.globalSetting,
|
|
22
|
+
file: env_1.file
|
|
23
|
+
};
|
|
24
|
+
exports.config = config;
|
|
25
|
+
exports.default = config;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { api, createApiInstance } from './api/instance';
|
|
2
|
+
import * as types from './types';
|
|
3
|
+
import * as utils from './utils';
|
|
4
|
+
import * as config from './config';
|
|
5
|
+
declare const http: {
|
|
6
|
+
createApiInstance: typeof createApiInstance;
|
|
7
|
+
instance: import("axios").AxiosInstance;
|
|
8
|
+
setSecurityData: (data: unknown) => void;
|
|
9
|
+
request: <T = any, _E = any>({ secure, path, type, query, format, body, ...params }: import("./api/HttpClient").FullRequestParams) => Promise<T>;
|
|
10
|
+
};
|
|
11
|
+
export { api, types, utils, config, http };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Automatically generated API toolkit for ReactPress
|
|
3
|
+
// Do not manually modify this file
|
|
4
|
+
// Generated at: 9/25/2025, 9:47:27 PM
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
+
if (mod && mod.__esModule) return mod;
|
|
19
|
+
var result = {};
|
|
20
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
__setModuleDefault(result, mod);
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.http = exports.config = exports.utils = exports.types = exports.api = void 0;
|
|
26
|
+
const instance_1 = require("./api/instance");
|
|
27
|
+
Object.defineProperty(exports, "api", { enumerable: true, get: function () { return instance_1.api; } });
|
|
28
|
+
const types = __importStar(require("./types"));
|
|
29
|
+
exports.types = types;
|
|
30
|
+
const utils = __importStar(require("./utils"));
|
|
31
|
+
exports.utils = utils;
|
|
32
|
+
const config = __importStar(require("./config"));
|
|
33
|
+
exports.config = config;
|
|
34
|
+
const http = {
|
|
35
|
+
...instance_1.http,
|
|
36
|
+
createApiInstance: instance_1.createApiInstance,
|
|
37
|
+
};
|
|
38
|
+
exports.http = http;
|