create-pubinfo-pr 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -0
  3. package/dist/cli-BgCjzF7D.d.ts +2 -0
  4. package/dist/cli.js +258 -0
  5. package/dist/helper-Cwc2jDwQ.js +229 -0
  6. package/dist/index-DCf5j10Q.d.ts +122 -0
  7. package/dist/index.js +3 -0
  8. package/package.json +52 -0
  9. package/templates/pubinfo-app/.browserslistrc +5 -0
  10. package/templates/pubinfo-app/.editorconfig +10 -0
  11. package/templates/pubinfo-app/.env +2 -0
  12. package/templates/pubinfo-app/.env.development +4 -0
  13. package/templates/pubinfo-app/.env.production +10 -0
  14. package/templates/pubinfo-app/.vscode/settings.json +50 -0
  15. package/templates/pubinfo-app/_gitignore +38 -0
  16. package/templates/pubinfo-app/_npmrc +5 -0
  17. package/templates/pubinfo-app/eslint.config.ts +3 -0
  18. package/templates/pubinfo-app/index.html +47 -0
  19. package/templates/pubinfo-app/openapi.config.ts.hbs +33 -0
  20. package/templates/pubinfo-app/package.json.hbs +59 -0
  21. package/templates/pubinfo-app/pubinfo.config.ts +9 -0
  22. package/templates/pubinfo-app/public/browser_upgrade/chrome.png +0 -0
  23. package/templates/pubinfo-app/public/browser_upgrade/edge.png +0 -0
  24. package/templates/pubinfo-app/public/browser_upgrade/index.css +49 -0
  25. package/templates/pubinfo-app/public/loading.css +92 -0
  26. package/templates/pubinfo-app/src/App.vue +7 -0
  27. package/templates/pubinfo-app/src/api/modules/auth/index.ts +3 -0
  28. package/templates/pubinfo-app/src/api/modules/auth/renzhengfuwu.ts +145 -0
  29. package/templates/pubinfo-app/src/api/modules/auth/typings.d.ts +97 -0
  30. package/templates/pubinfo-app/src/api/request.ts +125 -0
  31. package/templates/pubinfo-app/src/assets/icons/logo.svg +1 -0
  32. package/templates/pubinfo-app/src/assets/icons/process-management.svg +1 -0
  33. package/templates/pubinfo-app/src/assets/icons/workbench.svg +1 -0
  34. package/templates/pubinfo-app/src/assets/images/login-bg.webp +0 -0
  35. package/templates/pubinfo-app/src/assets/images/login-bg_dark.webp +0 -0
  36. package/templates/pubinfo-app/src/assets/images/login-small.png +0 -0
  37. package/templates/pubinfo-app/src/assets/images/login-small_dark.webp +0 -0
  38. package/templates/pubinfo-app/src/components/UIProvider/index.vue +51 -0
  39. package/templates/pubinfo-app/src/layouts/index.vue +48 -0
  40. package/templates/pubinfo-app/src/main.ts.hbs +26 -0
  41. package/templates/pubinfo-app/src/modules/captcha.ts +8 -0
  42. package/templates/pubinfo-app/src/modules/rbac.ts +10 -0
  43. package/templates/pubinfo-app/src/routes/index.ts +71 -0
  44. package/templates/pubinfo-app/src/routes/modules/demo/breadcrumb.example.ts +62 -0
  45. package/templates/pubinfo-app/src/routes/modules/demo/link.ts +15 -0
  46. package/templates/pubinfo-app/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
  47. package/templates/pubinfo-app/src/routes/modules/demo/other.page.ts +37 -0
  48. package/templates/pubinfo-app/src/routes/modules/demo/single.ts +14 -0
  49. package/templates/pubinfo-app/src/settings.ts.hbs +8 -0
  50. package/templates/pubinfo-app/src/stores/index.ts +2 -0
  51. package/templates/pubinfo-app/src/stores/modules/conter.ts +16 -0
  52. package/templates/pubinfo-app/src/views/demo/breadcrumb_example/detail1.vue +11 -0
  53. package/templates/pubinfo-app/src/views/demo/breadcrumb_example/detail2.vue +11 -0
  54. package/templates/pubinfo-app/src/views/demo/breadcrumb_example/list1.vue +11 -0
  55. package/templates/pubinfo-app/src/views/demo/breadcrumb_example/list2.vue +11 -0
  56. package/templates/pubinfo-app/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
  57. package/templates/pubinfo-app/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
  58. package/templates/pubinfo-app/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
  59. package/templates/pubinfo-app/src/views/demo/multilevel_menu_example/page.vue +11 -0
  60. package/templates/pubinfo-app/src/views/demo/other_page/des.vue +13 -0
  61. package/templates/pubinfo-app/src/views/demo/other_page/index.vue +25 -0
  62. package/templates/pubinfo-app/src/views/demo/preview-empty/index.vue +17 -0
  63. package/templates/pubinfo-app/src/views/demo/single/index.vue +13 -0
  64. package/templates/pubinfo-app/src/views/system/index.vue +5 -0
  65. package/templates/pubinfo-app/src/views/system/login/components/LoginForm.vue +29 -0
  66. package/templates/pubinfo-app/src/views/system/login/components/LoginWithPhone.vue +213 -0
  67. package/templates/pubinfo-app/src/views/system/login/components/PasswordLogin.vue +178 -0
  68. package/templates/pubinfo-app/src/views/system/login/components/Savephone.vue +17 -0
  69. package/templates/pubinfo-app/src/views/system/login/components/Useragreement.vue +26 -0
  70. package/templates/pubinfo-app/src/views/system/login/composables.ts +63 -0
  71. package/templates/pubinfo-app/src/views/system/login/index.vue +142 -0
  72. package/templates/pubinfo-app/stylelint.config.js +3 -0
  73. package/templates/pubinfo-app/tsconfig.json +3 -0
  74. package/templates/pubinfo-app/uno.config.ts +17 -0
  75. package/templates/pubinfo-module/.editorconfig +10 -0
  76. package/templates/pubinfo-module/.vscode/settings.json +50 -0
  77. package/templates/pubinfo-module/README.md.hbs +27 -0
  78. package/templates/pubinfo-module/_gitignore +38 -0
  79. package/templates/pubinfo-module/_npmrc +5 -0
  80. package/templates/pubinfo-module/eslint.config.ts +3 -0
  81. package/templates/pubinfo-module/package.json.hbs +67 -0
  82. package/templates/pubinfo-module/playground/.env +2 -0
  83. package/templates/pubinfo-module/playground/.env.development +4 -0
  84. package/templates/pubinfo-module/playground/.env.production +10 -0
  85. package/templates/pubinfo-module/playground/index.html +47 -0
  86. package/templates/pubinfo-module/playground/openapi.config.ts.hbs +33 -0
  87. package/templates/pubinfo-module/playground/package.json.hbs +21 -0
  88. package/templates/pubinfo-module/playground/pubinfo.config.ts +9 -0
  89. package/templates/pubinfo-module/playground/public/browser_upgrade/chrome.png +0 -0
  90. package/templates/pubinfo-module/playground/public/browser_upgrade/edge.png +0 -0
  91. package/templates/pubinfo-module/playground/public/browser_upgrade/index.css +49 -0
  92. package/templates/pubinfo-module/playground/public/loading.css +92 -0
  93. package/templates/pubinfo-module/playground/src/App.vue +7 -0
  94. package/templates/pubinfo-module/playground/src/api/modules/auth/index.ts +3 -0
  95. package/templates/pubinfo-module/playground/src/api/modules/auth/renzhengfuwu.ts +145 -0
  96. package/templates/pubinfo-module/playground/src/api/modules/auth/typings.d.ts +97 -0
  97. package/templates/pubinfo-module/playground/src/api/request.ts +125 -0
  98. package/templates/pubinfo-module/playground/src/assets/icons/logo.svg +1 -0
  99. package/templates/pubinfo-module/playground/src/assets/icons/process-management.svg +1 -0
  100. package/templates/pubinfo-module/playground/src/assets/icons/workbench.svg +1 -0
  101. package/templates/pubinfo-module/playground/src/assets/images/login-bg.webp +0 -0
  102. package/templates/pubinfo-module/playground/src/assets/images/login-bg_dark.webp +0 -0
  103. package/templates/pubinfo-module/playground/src/assets/images/login-small.png +0 -0
  104. package/templates/pubinfo-module/playground/src/assets/images/login-small_dark.webp +0 -0
  105. package/templates/pubinfo-module/playground/src/components/UIProvider/index.vue +51 -0
  106. package/templates/pubinfo-module/playground/src/layouts/index.vue +44 -0
  107. package/templates/pubinfo-module/playground/src/main.ts.hbs +22 -0
  108. package/templates/pubinfo-module/playground/src/modules/rbac.ts +10 -0
  109. package/templates/pubinfo-module/playground/src/routes/index.ts +71 -0
  110. package/templates/pubinfo-module/playground/src/routes/modules/demo/breadcrumb.example.ts +62 -0
  111. package/templates/pubinfo-module/playground/src/routes/modules/demo/link.ts +15 -0
  112. package/templates/pubinfo-module/playground/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
  113. package/templates/pubinfo-module/playground/src/routes/modules/demo/other.page.ts +37 -0
  114. package/templates/pubinfo-module/playground/src/routes/modules/demo/single.ts +14 -0
  115. package/templates/pubinfo-module/playground/src/settings.ts +8 -0
  116. package/templates/pubinfo-module/playground/src/stores/index.ts +2 -0
  117. package/templates/pubinfo-module/playground/src/stores/modules/conter.ts +16 -0
  118. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/detail1.vue +11 -0
  119. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/detail2.vue +11 -0
  120. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/list1.vue +11 -0
  121. package/templates/pubinfo-module/playground/src/views/demo/breadcrumb_example/list2.vue +11 -0
  122. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
  123. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
  124. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
  125. package/templates/pubinfo-module/playground/src/views/demo/multilevel_menu_example/page.vue +11 -0
  126. package/templates/pubinfo-module/playground/src/views/demo/other_page/des.vue +13 -0
  127. package/templates/pubinfo-module/playground/src/views/demo/other_page/index.vue +25 -0
  128. package/templates/pubinfo-module/playground/src/views/demo/preview-empty/index.vue +17 -0
  129. package/templates/pubinfo-module/playground/src/views/demo/single/index.vue +13 -0
  130. package/templates/pubinfo-module/playground/src/views/system/index.vue +5 -0
  131. package/templates/pubinfo-module/playground/src/views/system/login/components/LoginForm.vue +29 -0
  132. package/templates/pubinfo-module/playground/src/views/system/login/components/LoginWithPhone.vue +213 -0
  133. package/templates/pubinfo-module/playground/src/views/system/login/components/PasswordLogin.vue +194 -0
  134. package/templates/pubinfo-module/playground/src/views/system/login/components/Savephone.vue +17 -0
  135. package/templates/pubinfo-module/playground/src/views/system/login/components/Useragreement.vue +26 -0
  136. package/templates/pubinfo-module/playground/src/views/system/login/composables.ts +84 -0
  137. package/templates/pubinfo-module/playground/src/views/system/login/index.vue +142 -0
  138. package/templates/pubinfo-module/playground/tsconfig.json +3 -0
  139. package/templates/pubinfo-module/playground/uno.config.ts +17 -0
  140. package/templates/pubinfo-module/pnpm-workspace.yaml +2 -0
  141. package/templates/pubinfo-module/pubinfo.config.ts.hbs +36 -0
  142. package/templates/pubinfo-module/src/index.ts.hbs +9 -0
  143. package/templates/pubinfo-module/src/pages/demo.vue +11 -0
  144. package/templates/pubinfo-module/stylelint.config.js +3 -0
  145. package/templates/pubinfo-module/tsconfig.json +16 -0
  146. package/templates/pubinfo-module/uno.config.ts +8 -0
  147. package/templates/pubinfo-monorepo/.browserslistrc +5 -0
  148. package/templates/pubinfo-monorepo/.editorconfig +10 -0
  149. package/templates/pubinfo-monorepo/.vscode/settings.json +50 -0
  150. package/templates/pubinfo-monorepo/_gitignore +38 -0
  151. package/templates/pubinfo-monorepo/_npmrc +5 -0
  152. package/templates/pubinfo-monorepo/apps/basic/.env +2 -0
  153. package/templates/pubinfo-monorepo/apps/basic/.env.development +4 -0
  154. package/templates/pubinfo-monorepo/apps/basic/.env.production +10 -0
  155. package/templates/pubinfo-monorepo/apps/basic/index.html +47 -0
  156. package/templates/pubinfo-monorepo/apps/basic/openapi.config.ts.hbs +33 -0
  157. package/templates/pubinfo-monorepo/apps/basic/package.json.hbs +26 -0
  158. package/templates/pubinfo-monorepo/apps/basic/pubinfo.config.ts +9 -0
  159. package/templates/pubinfo-monorepo/apps/basic/public/browser_upgrade/chrome.png +0 -0
  160. package/templates/pubinfo-monorepo/apps/basic/public/browser_upgrade/edge.png +0 -0
  161. package/templates/pubinfo-monorepo/apps/basic/public/browser_upgrade/index.css +49 -0
  162. package/templates/pubinfo-monorepo/apps/basic/public/loading.css +92 -0
  163. package/templates/pubinfo-monorepo/apps/basic/src/App.vue +7 -0
  164. package/templates/pubinfo-monorepo/apps/basic/src/api/modules/auth/index.ts +3 -0
  165. package/templates/pubinfo-monorepo/apps/basic/src/api/modules/auth/renzhengfuwu.ts +145 -0
  166. package/templates/pubinfo-monorepo/apps/basic/src/api/modules/auth/typings.d.ts +97 -0
  167. package/templates/pubinfo-monorepo/apps/basic/src/api/request.ts +125 -0
  168. package/templates/pubinfo-monorepo/apps/basic/src/assets/icons/logo.svg +1 -0
  169. package/templates/pubinfo-monorepo/apps/basic/src/assets/icons/process-management.svg +1 -0
  170. package/templates/pubinfo-monorepo/apps/basic/src/assets/icons/workbench.svg +1 -0
  171. package/templates/pubinfo-monorepo/apps/basic/src/assets/images/login-bg.webp +0 -0
  172. package/templates/pubinfo-monorepo/apps/basic/src/assets/images/login-bg_dark.webp +0 -0
  173. package/templates/pubinfo-monorepo/apps/basic/src/assets/images/login-small.png +0 -0
  174. package/templates/pubinfo-monorepo/apps/basic/src/assets/images/login-small_dark.webp +0 -0
  175. package/templates/pubinfo-monorepo/apps/basic/src/components/UIProvider/index.vue +51 -0
  176. package/templates/pubinfo-monorepo/apps/basic/src/layouts/index.vue +48 -0
  177. package/templates/pubinfo-monorepo/apps/basic/src/main.ts.hbs +26 -0
  178. package/templates/pubinfo-monorepo/apps/basic/src/modules/captcha.ts +8 -0
  179. package/templates/pubinfo-monorepo/apps/basic/src/modules/rbac.ts +10 -0
  180. package/templates/pubinfo-monorepo/apps/basic/src/routes/index.ts +71 -0
  181. package/templates/pubinfo-monorepo/apps/basic/src/routes/modules/demo/breadcrumb.example.ts +62 -0
  182. package/templates/pubinfo-monorepo/apps/basic/src/routes/modules/demo/link.ts +15 -0
  183. package/templates/pubinfo-monorepo/apps/basic/src/routes/modules/demo/multilevel.menu.example.ts +68 -0
  184. package/templates/pubinfo-monorepo/apps/basic/src/routes/modules/demo/other.page.ts +37 -0
  185. package/templates/pubinfo-monorepo/apps/basic/src/routes/modules/demo/single.ts +14 -0
  186. package/templates/pubinfo-monorepo/apps/basic/src/settings.ts.hbs +8 -0
  187. package/templates/pubinfo-monorepo/apps/basic/src/stores/index.ts +2 -0
  188. package/templates/pubinfo-monorepo/apps/basic/src/stores/modules/conter.ts +16 -0
  189. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/breadcrumb_example/detail1.vue +11 -0
  190. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/breadcrumb_example/detail2.vue +11 -0
  191. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/breadcrumb_example/list1.vue +11 -0
  192. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/breadcrumb_example/list2.vue +11 -0
  193. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/multilevel_menu_example/level2/level3/page1.vue +11 -0
  194. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/multilevel_menu_example/level2/level3/page2.vue +11 -0
  195. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/multilevel_menu_example/level2/page.vue +11 -0
  196. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/multilevel_menu_example/page.vue +11 -0
  197. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/other_page/des.vue +13 -0
  198. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/other_page/index.vue +25 -0
  199. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/preview-empty/index.vue +17 -0
  200. package/templates/pubinfo-monorepo/apps/basic/src/views/demo/single/index.vue +13 -0
  201. package/templates/pubinfo-monorepo/apps/basic/src/views/system/index.vue +5 -0
  202. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/components/LoginForm.vue +29 -0
  203. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/components/LoginWithPhone.vue +213 -0
  204. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/components/PasswordLogin.vue +178 -0
  205. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/components/Savephone.vue +17 -0
  206. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/components/Useragreement.vue +26 -0
  207. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/composables.ts +63 -0
  208. package/templates/pubinfo-monorepo/apps/basic/src/views/system/login/index.vue +142 -0
  209. package/templates/pubinfo-monorepo/apps/basic/tsconfig.json +3 -0
  210. package/templates/pubinfo-monorepo/apps/basic/uno.config.ts +17 -0
  211. package/templates/pubinfo-monorepo/eslint.config.ts +3 -0
  212. package/templates/pubinfo-monorepo/package.json.hbs +45 -0
  213. package/templates/pubinfo-monorepo/pnpm-lock.yaml +12686 -0
  214. package/templates/pubinfo-monorepo/pnpm-workspace.yaml +11 -0
  215. package/templates/pubinfo-monorepo/stylelint.config.js +3 -0
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "create-pubinfo-pr",
3
+ "type": "module",
4
+ "version": "0.1.1",
5
+ "description": "初始化项目框架",
6
+ "author": "Werheng <werheng.zhang@gmail.com>",
7
+ "license": "MIT",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "main": "./dist/index.js",
15
+ "module": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "bin": {
18
+ "pubinfo": "./dist/cli.js"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "templates"
23
+ ],
24
+ "engines": {
25
+ "node": "^20.19.0 || >=22.12.0"
26
+ },
27
+ "dependencies": {
28
+ "@inquirer/prompts": "^7.6.0",
29
+ "@pubinfo-pr/shared": "0.1.1",
30
+ "ansi-colors": "^4.1.3",
31
+ "cfonts": "^3.3.0",
32
+ "commander": "^14.0.0",
33
+ "confbox": "^0.2.2",
34
+ "fs-extra": "^11.3.0",
35
+ "giget": "^2.0.0",
36
+ "node-plop": "0.32.2",
37
+ "ofetch": "^1.4.1",
38
+ "ora": "^8.2.0",
39
+ "rimraf": "^6.0.1",
40
+ "semver": "^7.7.2"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^24.0.10"
44
+ },
45
+ "scripts": {
46
+ "dev": "tsdown --watch src",
47
+ "build": "tsdown",
48
+ "cli": "node dist/cli.js",
49
+ "cli:clean": "rimraf ./my-app",
50
+ "lint": "eslint . --cache --fix"
51
+ }
52
+ }
@@ -0,0 +1,5 @@
1
+ # Browsers that we support
2
+
3
+ last 2 version
4
+ > 1%
5
+ not dead # no browsers without security updates
@@ -0,0 +1,10 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ quote_type = single
@@ -0,0 +1,2 @@
1
+ # 页面标题
2
+ VITE_APP_TITLE = 产数开发底座
@@ -0,0 +1,4 @@
1
+ # 接口请求地址,会设置到 axios 的 baseURL 参数上
2
+ VITE_APP_API_BASEURL = http://localhost:9099/pubinfo-sys
3
+ # 是否开启代理
4
+ VITE_OPEN_PROXY = false
@@ -0,0 +1,10 @@
1
+ # 接口请求地址,会设置到 axios 的 baseURL 参数上
2
+ VITE_APP_API_BASEURL = /pubinfo-sys
3
+ # 是否在打包时启用 Mock
4
+ VITE_BUILD_MOCK = false
5
+ # 是否在打包时生成 sourcemap
6
+ VITE_BUILD_SOURCEMAP = false
7
+ # 是否在打包时开启压缩,支持 gzip 和 brotli,例如 gzip,brotli
8
+ VITE_BUILD_COMPRESS =
9
+ # 是否在打包时启用传统浏览器兼容,可在 .browserslistrc 中进行具体配置
10
+ VITE_BUILD_LEGACY = false
@@ -0,0 +1,50 @@
1
+ {
2
+ // Disable the default formatter, use eslint instead
3
+ "prettier.enable": false,
4
+ "editor.formatOnSave": false,
5
+
6
+ // Auto fix
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll.eslint": "explicit",
9
+ "source.organizeImports": "never"
10
+ },
11
+
12
+ // Silent the stylistic rules in you IDE, but still auto fix them
13
+ "eslint.rules.customizations": [
14
+ { "rule": "style/*", "severity": "off", "fixable": true },
15
+ { "rule": "format/*", "severity": "off", "fixable": true },
16
+ { "rule": "*-indent", "severity": "off", "fixable": true },
17
+ { "rule": "*-spacing", "severity": "off", "fixable": true },
18
+ { "rule": "*-spaces", "severity": "off", "fixable": true },
19
+ { "rule": "*-order", "severity": "off", "fixable": true },
20
+ { "rule": "*-dangle", "severity": "off", "fixable": true },
21
+ { "rule": "*-newline", "severity": "off", "fixable": true },
22
+ { "rule": "*quotes", "severity": "off", "fixable": true },
23
+ { "rule": "*semi", "severity": "off", "fixable": true }
24
+ ],
25
+
26
+ // Enable eslint for all supported languages
27
+ "eslint.validate": [
28
+ "javascript",
29
+ "javascriptreact",
30
+ "typescript",
31
+ "typescriptreact",
32
+ "vue",
33
+ "html",
34
+ "markdown",
35
+ "json",
36
+ "jsonc",
37
+ "yaml",
38
+ "toml",
39
+ "xml",
40
+ "gql",
41
+ "graphql",
42
+ "astro",
43
+ "svelte",
44
+ "css",
45
+ "less",
46
+ "scss",
47
+ "pcss",
48
+ "postcss"
49
+ ]
50
+ }
@@ -0,0 +1,38 @@
1
+ .pubinfo
2
+ .eslintcache
3
+ .stylelintcache
4
+ .gitmessage
5
+
6
+ # auto generated
7
+ auto-imports.d.ts
8
+ components.d.ts
9
+
10
+ .DS_Store
11
+ node_modules
12
+ dist
13
+ cache
14
+ coverage
15
+ .turbo
16
+ .eslintcache
17
+ .stylelintcache
18
+
19
+ # local env files
20
+ .env.local
21
+ .env.*.local
22
+
23
+ # Log files
24
+ npm-debug.log*
25
+ yarn-debug.log*
26
+ yarn-error.log*
27
+ pnpm-debug.log*
28
+ lerna-debug.log*
29
+
30
+ # Editor directories and files
31
+ .idea
32
+ # .vscode
33
+ *.suo
34
+ *.ntvs*
35
+ *.njsproj
36
+ *.sln
37
+ *.sw?
38
+
@@ -0,0 +1,5 @@
1
+ ignore-workspace-root-check=true
2
+ shamefully-hoist=true
3
+ strict-peer-dependencies=false
4
+ shell-emulator=true
5
+ max-old-space-size=4096
@@ -0,0 +1,3 @@
1
+ import pubinfo from 'pubinfo/eslint';
2
+
3
+ export default pubinfo();
@@ -0,0 +1,47 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="src/assets/icons/logo.svg" type="image/svg+xml"/>
6
+ <link rel="stylesheet" href="/loading.css" />
7
+ <link rel="stylesheet" href="/browser_upgrade/index.css" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
+ <meta http-equiv="Expires" content="0">
10
+ <meta http-equiv="Pragma" content="no-cache">
11
+ <meta http-equiv="Cache-control" content="no-cache">
12
+ <meta http-equiv="Cache" content="no-cache">
13
+ <title>%VITE_APP_TITLE%</title>
14
+ </head>
15
+ <body>
16
+ <div id="app">
17
+ <div class="w-admin-home">
18
+ <div class="loading">
19
+ <div class="square"></div>
20
+ <div class="square"></div>
21
+ <div class="square"></div>
22
+ <div class="square"></div>
23
+ </div>
24
+ <div class="text">载入中</div>
25
+ </div>
26
+ <div id="browser-upgrade">
27
+ <div class="title">为了您的体验,推荐使用以下浏览器</div>
28
+ <div class="browsers">
29
+ <a href="https://www.microsoft.com/edge" target="_blank" class="browser">
30
+ <img class="browser-icon" src="/browser_upgrade/edge.png" />
31
+ <div class="browser-name">Mircosoft Edge</div>
32
+ </a>
33
+ <a href="https://www.google.cn/chrome/" target="_blank" class="browser">
34
+ <img class="browser-icon" src="/browser_upgrade/chrome.png" />
35
+ <div class="browser-name">Google Chrome</div>
36
+ </a>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <script>
41
+ if (!!window.ActiveXObject || 'ActiveXObject' in window) {
42
+ document.getElementById('browser-upgrade').style.display = 'block';
43
+ }
44
+ </script>
45
+ <script type="module" src="/src/main.ts"></script>
46
+ </body>
47
+ </html>
@@ -0,0 +1,33 @@
1
+ import { defineConfig } from '@pubinfo/openapi';
2
+ import { presetName } from '@pubinfo/preset-openapi';
3
+
4
+ export default defineConfig({
5
+ enabled: {{openapi}},
6
+
7
+ presets: [
8
+ // 小驼峰式命名
9
+ presetName({
10
+ functionName: 'camelCase',
11
+ }),
12
+ ],
13
+
14
+ imports: { '@/api/request': [{ name: 'basic', as: 'request' }] },
15
+ batch: [
16
+ {
17
+ input: 'http://localhost:9099/pubinfo-sys/v3/api-docs/auth',
18
+ output: './src/api/modules/auth',
19
+ imports: { '@/api/request': [{ name: 'auth', as: 'request' }] },
20
+ },
21
+ ],
22
+
23
+ hooks: {
24
+ customType(schema, namespace, defaultFn) {
25
+ // `int64` 在前端会精度丢失,可在此处调整对应字段的 `TS类型`
26
+ if (schema?.type === 'integer' && schema?.format === 'int64') {
27
+ return 'number';
28
+ }
29
+
30
+ return defaultFn(schema, namespace);
31
+ },
32
+ },
33
+ });
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "{{dir}}",
3
+ "type": "module",
4
+ "private": true,
5
+ "packageManager": "pnpm@10.12.4",
6
+ "engines": {
7
+ "node": "^20.19.0 || >=22.12.0"
8
+ },
9
+ "scripts": {
10
+ "dev": "pubinfo dev",
11
+ "build": "pubinfo build",
12
+ "preview": "pubinfo preview",
13
+ "commit": "pubinfo commit",
14
+ "upgrade": "pubinfo upgrade",
15
+ "prepare": "pubinfo setup && pubinfo commit --init",
16
+ "lint": "pnpm run lint:eslint && pnpm run lint:stylelint",
17
+ "lint:eslint": "eslint . --cache --fix",
18
+ "lint:stylelint": "stylelint \"src/**/*.{css,scss,vue}\" --cache --fix",
19
+ "viewer:eslint-rule": "pnpx @eslint/config-inspector",
20
+ "openapi": "pnpx @pubinfo/openapi generate",
21
+ "icon:normalize": "pubinfo icon"
22
+ },
23
+ "dependencies": {
24
+ "@ant-design/icons-vue": "^7.0.1",
25
+ "@pubinfo/module-captcha": "{{version}}",
26
+ {{#if rbac}}
27
+ "@pubinfo/module-rbac": "{{version}}",
28
+ {{/if}}
29
+ "@pubinfo/pro-components": "^1.7.1",
30
+ "@vueuse/core": "^13.7.0",
31
+ "alova": "^3.3.4",
32
+ "ant-design-vue": "^4.2.6",
33
+ "dayjs": "^1.11.13",
34
+ "pubinfo": "{{version}}"
35
+ },
36
+ "devDependencies": {
37
+ "@pubinfo/openapi": "^0.9.0",
38
+ "@pubinfo/preset-openapi": "^0.9.0",
39
+ "eslint": "^9.30.1",
40
+ "lint-staged": "^16.1.2",
41
+ "simple-git-hooks": "^2.13.0",
42
+ "stylelint": "^16.21.0",
43
+ "typescript": "^5.8.3"
44
+ },
45
+ "simple-git-hooks": {
46
+ "pre-commit": "pnpm lint-staged",
47
+ "commit-msg": "pnpm exec pubinfo commit --edit $1"
48
+ },
49
+ "lint-staged": {
50
+ "*.{vue,js,ts,jsx,tsx,md,json}": "eslint --cache --fix",
51
+ "*.{css,less,scss,vue}": "stylelint --cache --fix"
52
+ },
53
+ "config": {
54
+ "commitizen": {
55
+ "path": "node_modules/cz-git",
56
+ "czConfig": ".pubinfo/cz.config.cjs"
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,9 @@
1
+ import { definePubinfoConfig } from 'pubinfo/node';
2
+
3
+ export default definePubinfoConfig({
4
+ vite: {
5
+ server: {
6
+ port: 5173,
7
+ },
8
+ },
9
+ });
@@ -0,0 +1,49 @@
1
+ #browser-upgrade {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ z-index: 10001;
6
+ display: none;
7
+ width: 100%;
8
+ height: 100%;
9
+ color: #736477;
10
+ user-select: none;
11
+ background-color: snow;
12
+ }
13
+
14
+ #browser-upgrade .title {
15
+ margin: 40px 0;
16
+ font-size: 24px;
17
+ text-align: center;
18
+ }
19
+
20
+ #browser-upgrade .browsers {
21
+ text-align: center;
22
+ }
23
+
24
+ #browser-upgrade .browsers .browser {
25
+ display: inline-block;
26
+ margin: 0 20px;
27
+ text-decoration: none;
28
+ cursor: pointer;
29
+ }
30
+
31
+ #browser-upgrade .browsers .browser .browser-icon {
32
+ display: block;
33
+ width: 50px;
34
+ height: 50px;
35
+ margin: 0 auto;
36
+ border: none;
37
+ }
38
+
39
+ #browser-upgrade .browsers .browser .browser-name {
40
+ padding-bottom: 2px;
41
+ margin-top: 10px;
42
+ color: #736477;
43
+ text-align: center;
44
+ border-bottom: 1px solid transparent;
45
+ }
46
+
47
+ #browser-upgrade .browsers .browser:hover .browser-name {
48
+ border-bottom: 1px solid #736477;
49
+ }
@@ -0,0 +1,92 @@
1
+ #app {
2
+ height: 100%;
3
+ }
4
+
5
+ .w-admin-home {
6
+ position: absolute;
7
+ top: 0;
8
+ left: 0;
9
+ z-index: 10000;
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ justify-content: center;
14
+ width: 100%;
15
+ height: 100%;
16
+ color: #736477;
17
+ user-select: none;
18
+ background-color: snow;
19
+ }
20
+
21
+ .w-admin-home .loading {
22
+ display: flex;
23
+ flex-wrap: wrap;
24
+ align-items: center;
25
+ justify-content: center;
26
+ width: 40px;
27
+ height: 40px;
28
+ }
29
+
30
+ .w-admin-home .loading .square {
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 20px;
35
+ height: 20px;
36
+ }
37
+
38
+ .w-admin-home .loading .square::before {
39
+ width: 10px;
40
+ height: 10px;
41
+ content: "";
42
+ border: 3px solid #8c858f;
43
+ border-radius: 15%;
44
+ animation: square-to-dot-animation 2s linear infinite;
45
+ }
46
+
47
+ .w-admin-home .loading .square:nth-child(1)::before {
48
+ animation-delay: calc(150ms * 1);
49
+ }
50
+
51
+ .w-admin-home .loading .square:nth-child(2)::before {
52
+ animation-delay: calc(150ms * 2);
53
+ }
54
+
55
+ .w-admin-home .loading .square:nth-child(3)::before {
56
+ animation-delay: calc(150ms * 3);
57
+ }
58
+
59
+ .w-admin-home .loading .square:nth-child(4)::before {
60
+ animation-delay: calc(150ms * 4);
61
+ }
62
+
63
+ @keyframes square-to-dot-animation {
64
+ 15%,
65
+ 25% {
66
+ width: 0;
67
+ height: 0;
68
+ margin: 5px;
69
+ border-width: 5px;
70
+ border-radius: 100%;
71
+ }
72
+
73
+ 40% {
74
+ width: 10px;
75
+ height: 10px;
76
+ margin: initial;
77
+ border-width: 3px;
78
+ border-radius: 15%;
79
+ }
80
+ }
81
+
82
+ .w-admin-home .text {
83
+ position: relative;
84
+ margin-top: 20px;
85
+ font-size: 24px;
86
+ }
87
+
88
+ .w-admin-home .text::after {
89
+ position: absolute;
90
+ padding-left: 5px;
91
+ content: "…";
92
+ }
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <UIProvider>
3
+ <PubinfoProvider>
4
+ <PubinfoApp />
5
+ </PubinfoProvider>
6
+ </UIProvider>
7
+ </template>
@@ -0,0 +1,3 @@
1
+ // API 更新时间:
2
+ // API 唯一标识:
3
+ export * from './renzhengfuwu';
@@ -0,0 +1,145 @@
1
+ import { auth as request } from '@/api/request';
2
+
3
+ /**
4
+ * @description 切换登录组织
5
+ * @url /auth/changeLoginOrg
6
+ * @method POST
7
+ * @author @pubinfo/openapi
8
+ */
9
+ export function postAuthChangeLoginOrg<
10
+ R = API.ResponseDataLoginTokenVo,
11
+ T = API.ResponseDataLoginTokenVo,
12
+ >(
13
+ params: API.postAuthChangeLoginOrgParams,
14
+ options?: Parameters<typeof request.Post<R, T>>[2],
15
+ ) {
16
+ return request.Post<R, T>(
17
+ '/auth/changeLoginOrg',
18
+ {},
19
+ {
20
+ params: {
21
+ ...params,
22
+ },
23
+ ...(options || {}),
24
+ },
25
+ );
26
+ }
27
+
28
+ /**
29
+ * @description 判断缓存的token是否有效
30
+ * @url /auth/checkCacheToken
31
+ * @method GET
32
+ * @author @pubinfo/openapi
33
+ */
34
+ export function getAuthCheckCacheToken<
35
+ R = API.ResponseDataBoolean,
36
+ T = API.ResponseDataBoolean,
37
+ >(
38
+ params: API.getAuthCheckCacheTokenParams,
39
+ options?: Parameters<typeof request.Get<R, T>>[1],
40
+ ) {
41
+ return request.Get<R, T>('/auth/checkCacheToken', {
42
+ params: {
43
+ ...params,
44
+ },
45
+ ...(options || {}),
46
+ });
47
+ }
48
+
49
+ /**
50
+ * @description 密码登录
51
+ * @url /auth/login
52
+ * @method POST
53
+ * @author @pubinfo/openapi
54
+ */
55
+ export function postAuthLogin<
56
+ R = API.ResponseDataLoginTokenVo,
57
+ T = API.ResponseDataLoginTokenVo,
58
+ >(body: API.LoginByPwdDto, options?: Parameters<typeof request.Post<R, T>>[2]) {
59
+ return request.Post<R, T>('/auth/login', body, {
60
+ headers: {
61
+ 'Content-Type': 'application/json',
62
+ },
63
+ ...(options || {}),
64
+ });
65
+ }
66
+
67
+ /**
68
+ * @description 获取登录公钥
69
+ * @url /auth/login/key
70
+ * @method GET
71
+ * @author @pubinfo/openapi
72
+ */
73
+ export function getAuthLoginKey<
74
+ R = API.ResponseDataString,
75
+ T = API.ResponseDataString,
76
+ >(options?: Parameters<typeof request.Get<R, T>>[1]) {
77
+ return request.Get<R, T>('/auth/login/key', {
78
+ ...(options || {}),
79
+ });
80
+ }
81
+
82
+ /**
83
+ * @description 获取图片验证码
84
+ * @url /auth/login/validCode
85
+ * @method GET
86
+ * @author @pubinfo/openapi
87
+ */
88
+ export function getAuthLoginValidCode<
89
+ R = API.ResponseDataValidCodeVo,
90
+ T = API.ResponseDataValidCodeVo,
91
+ >(
92
+ params: API.getAuthLoginValidCodeParams,
93
+ options?: Parameters<typeof request.Get<R, T>>[1],
94
+ ) {
95
+ return request.Get<R, T>('/auth/login/validCode', {
96
+ params: {
97
+ ...params,
98
+ },
99
+ ...(options || {}),
100
+ });
101
+ }
102
+
103
+ /**
104
+ * @description 登出
105
+ * @url /auth/loginOut
106
+ * @method POST
107
+ * @author @pubinfo/openapi
108
+ */
109
+ export function postAuthLoginOut<
110
+ R = API.ResponseDataVoid,
111
+ T = API.ResponseDataVoid,
112
+ >(options?: Parameters<typeof request.Post<R, T>>[2]) {
113
+ return request.Post<R, T>(
114
+ '/auth/loginOut',
115
+ {},
116
+ {
117
+ ...(options || {}),
118
+ },
119
+ );
120
+ }
121
+
122
+ /**
123
+ * @description 刷新访问令牌
124
+ * @url /auth/token/refresh
125
+ * @method POST
126
+ * @author @pubinfo/openapi
127
+ */
128
+ export function postAuthTokenRefresh<
129
+ R = API.ResponseDataLoginTokenVo,
130
+ T = API.ResponseDataLoginTokenVo,
131
+ >(
132
+ params: API.postAuthTokenRefreshParams,
133
+ options?: Parameters<typeof request.Post<R, T>>[2],
134
+ ) {
135
+ return request.Post<R, T>(
136
+ '/auth/token/refresh',
137
+ {},
138
+ {
139
+ params: {
140
+ ...params,
141
+ },
142
+ ...(options || {}),
143
+ },
144
+ );
145
+ }