@moluoxixi/create-app 2.0.436 → 2.0.438

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 (273) hide show
  1. package/dist/constants/index.d.ts +5 -0
  2. package/dist/constants/index.js +8 -0
  3. package/dist/core/feature.d.ts +26 -20
  4. package/dist/core/feature.js +47 -52
  5. package/dist/core/prompts.js +6 -3
  6. package/dist/core/template.js +1 -1
  7. package/dist/generators/project.js +8 -0
  8. package/dist/types/packageJson.d.ts +2 -0
  9. package/dist/utils/deepMerge.d.ts +1 -1
  10. package/dist/utils/file.js +6 -2
  11. package/dist/utils/framework.d.ts +11 -0
  12. package/dist/utils/framework.js +13 -0
  13. package/dist/utils/index.d.ts +1 -0
  14. package/dist/utils/index.js +1 -0
  15. package/package.json +4 -5
  16. package/templates/common/base/_npmrc +2 -0
  17. package/templates/common/base/_yarnrc.yml +3 -0
  18. package/templates/common/base/node_modules/.bin/parser +4 -4
  19. package/templates/common/base/node_modules/.bin/rollup +4 -4
  20. package/templates/common/base/node_modules/.bin/sass +2 -2
  21. package/templates/common/base/node_modules/.bin/terser +4 -4
  22. package/templates/common/base/node_modules/.bin/vite +2 -2
  23. package/templates/common/base/package.json +2 -4
  24. package/templates/common/base/scripts/build.mts +15 -10
  25. package/templates/common/base/src/apis/request.ts +23 -32
  26. package/templates/common/base/src/apis/services/example.ts +2 -2
  27. package/templates/common/base/src/apis/services/user.ts +2 -2
  28. package/templates/common/base/tsconfig.app.json +25 -0
  29. package/templates/common/base/tsconfig.base.json +17 -0
  30. package/templates/common/base/tsconfig.json +11 -0
  31. package/templates/common/base/tsconfig.node.json +14 -0
  32. package/templates/common/base/vite/index.ts +19 -18
  33. package/templates/common/base/vite.config.ts +8 -4
  34. package/templates/common/features/eslint/node_modules/.bin/sass +17 -0
  35. package/templates/common/features/eslint/node_modules/.bin/terser +17 -0
  36. package/templates/common/features/eslint/node_modules/.bin/tsx +17 -0
  37. package/templates/common/features/eslint/node_modules/.bin/vitest +17 -0
  38. package/templates/common/features/eslint/node_modules/.bin/yaml +17 -0
  39. package/templates/common/features/eslint/tsconfig.base.json +17 -0
  40. package/templates/common/features/eslint/tsconfig.json +8 -0
  41. package/templates/common/features/eslint/tsconfig.node.json +13 -0
  42. package/templates/common/features/husky/.husky/pre-commit +1 -1
  43. package/templates/common/features/husky/node_modules/.bin/commitizen +2 -2
  44. package/templates/common/features/husky/node_modules/.bin/commitlint +2 -2
  45. package/templates/common/features/husky/node_modules/.bin/cz +2 -2
  46. package/templates/common/features/husky/node_modules/.bin/git-cz +2 -2
  47. package/templates/common/features/husky/tsconfig.base.json +17 -0
  48. package/templates/common/features/husky/tsconfig.json +8 -0
  49. package/templates/common/features/husky/tsconfig.node.json +13 -0
  50. package/templates/react/base/node_modules/.bin/sass +4 -4
  51. package/templates/react/base/node_modules/.bin/terser +4 -4
  52. package/templates/react/base/node_modules/.bin/vite +4 -4
  53. package/templates/react/base/package.json +2 -1
  54. package/templates/react/base/src/main.tsx +1 -1
  55. package/templates/react/base/src/router/index.tsx +26 -0
  56. package/templates/react/base/src/utils/common.ts +126 -0
  57. package/templates/react/base/src/utils/index.ts +7 -0
  58. package/templates/react/base/tsconfig.app.json +13 -5
  59. package/templates/react/base/tsconfig.node.json +6 -7
  60. package/templates/react/features/ant-design/tsconfig.app.json +25 -0
  61. package/templates/react/features/ant-design/tsconfig.base.json +22 -0
  62. package/templates/react/features/ant-design/tsconfig.json +11 -0
  63. package/templates/react/features/ant-design/tsconfig.node.json +14 -0
  64. package/templates/react/features/i18n/tsconfig.app.json +25 -0
  65. package/templates/react/features/i18n/tsconfig.base.json +22 -0
  66. package/templates/react/features/i18n/tsconfig.json +11 -0
  67. package/templates/react/features/i18n/tsconfig.node.json +14 -0
  68. package/templates/react/features/manualRoutes/tsconfig.app.json +25 -0
  69. package/templates/react/features/manualRoutes/tsconfig.base.json +27 -0
  70. package/templates/react/features/manualRoutes/tsconfig.json +11 -0
  71. package/templates/react/features/manualRoutes/tsconfig.node.json +14 -0
  72. package/templates/react/features/pageRoutes/node_modules/.bin/browserslist +17 -0
  73. package/templates/react/features/pageRoutes/node_modules/.bin/jiti +17 -0
  74. package/templates/react/features/pageRoutes/node_modules/.bin/parser +17 -0
  75. package/templates/react/features/pageRoutes/node_modules/.bin/rollup +17 -0
  76. package/templates/react/features/pageRoutes/node_modules/.bin/sass +17 -0
  77. package/templates/react/features/pageRoutes/node_modules/.bin/terser +17 -0
  78. package/templates/react/features/pageRoutes/node_modules/.bin/tsc +17 -0
  79. package/templates/react/features/pageRoutes/node_modules/.bin/tsserver +17 -0
  80. package/templates/react/features/pageRoutes/node_modules/.bin/tsx +17 -0
  81. package/templates/react/features/pageRoutes/node_modules/.bin/vite +17 -0
  82. package/templates/react/features/pageRoutes/node_modules/.bin/yaml +17 -0
  83. package/templates/react/features/pageRoutes/package.json +4 -0
  84. package/templates/react/features/pageRoutes/tsconfig.app.json +25 -0
  85. package/templates/react/features/pageRoutes/tsconfig.base.json +27 -0
  86. package/templates/react/features/pageRoutes/tsconfig.json +11 -0
  87. package/templates/react/features/pageRoutes/tsconfig.node.json +14 -0
  88. package/templates/react/features/pageRoutes/vite/features/pageRoutes.ts +15 -0
  89. package/templates/react/features/sentry/node_modules/.bin/browserslist +17 -0
  90. package/templates/react/features/sentry/node_modules/.bin/jiti +17 -0
  91. package/templates/react/features/sentry/node_modules/.bin/parser +17 -0
  92. package/templates/react/features/sentry/node_modules/.bin/rollup +17 -0
  93. package/templates/react/features/sentry/node_modules/.bin/sass +17 -0
  94. package/templates/react/features/sentry/node_modules/.bin/terser +17 -0
  95. package/templates/react/features/sentry/node_modules/.bin/tsc +17 -0
  96. package/templates/react/features/sentry/node_modules/.bin/tsserver +17 -0
  97. package/templates/react/features/sentry/node_modules/.bin/tsx +17 -0
  98. package/templates/react/features/sentry/node_modules/.bin/vite +17 -0
  99. package/templates/react/features/sentry/node_modules/.bin/yaml +17 -0
  100. package/templates/react/features/sentry/package.json +3 -0
  101. package/templates/react/features/sentry/tsconfig.app.json +25 -0
  102. package/templates/react/features/sentry/tsconfig.base.json +22 -0
  103. package/templates/react/features/sentry/tsconfig.json +11 -0
  104. package/templates/react/features/sentry/tsconfig.node.json +14 -0
  105. package/templates/react/features/sentry/vite/features/sentry.ts +19 -25
  106. package/templates/react/features/zustand/tsconfig.app.json +25 -0
  107. package/templates/react/features/zustand/tsconfig.base.json +27 -0
  108. package/templates/react/features/zustand/tsconfig.json +11 -0
  109. package/templates/react/features/zustand/tsconfig.node.json +14 -0
  110. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/browserslist +17 -0
  111. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/parser +17 -0
  112. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/rollup +17 -0
  113. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/sass +4 -4
  114. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/terser +4 -4
  115. package/templates/react/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
  116. package/templates/react/micro-frontends/qiankun/base/package.json +2 -1
  117. package/templates/react/micro-frontends/qiankun/base/src/main.tsx +3 -3
  118. package/templates/react/micro-frontends/qiankun/base/tsconfig.app.json +25 -0
  119. package/templates/react/micro-frontends/qiankun/base/tsconfig.base.json +27 -0
  120. package/templates/react/micro-frontends/qiankun/base/tsconfig.json +11 -0
  121. package/templates/react/micro-frontends/qiankun/base/tsconfig.node.json +14 -0
  122. package/templates/react/micro-frontends/qiankun/base/vite/index.ts +19 -18
  123. package/templates/vue/base/node_modules/.bin/vue-tsc +2 -2
  124. package/templates/vue/base/package.json +3 -2
  125. package/templates/vue/base/src/assets/fonts/index.css +6 -0
  126. package/templates/vue/base/src/assets/styles/base.scss +33 -0
  127. package/templates/vue/base/src/assets/styles/custom.scss +20 -0
  128. package/templates/vue/base/src/assets/styles/main.scss +8 -0
  129. package/templates/vue/base/src/assets/styles/tailwind.scss +3 -0
  130. package/templates/vue/base/src/main.ts +3 -3
  131. package/templates/vue/base/src/router/index.ts +25 -0
  132. package/templates/vue/base/src/utils/common.ts +126 -0
  133. package/templates/vue/base/src/utils/index.ts +4 -0
  134. package/templates/vue/base/tsconfig.app.json +10 -3
  135. package/templates/vue/base/tsconfig.base.json +2 -6
  136. package/templates/vue/base/tsconfig.json +1 -0
  137. package/templates/vue/base/tsconfig.node.json +1 -2
  138. package/templates/vue/features/ant-design-vue/tsconfig.app.json +33 -0
  139. package/templates/vue/features/ant-design-vue/tsconfig.base.json +25 -0
  140. package/templates/vue/features/ant-design-vue/tsconfig.json +12 -0
  141. package/templates/vue/features/ant-design-vue/tsconfig.node.json +14 -0
  142. package/templates/vue/features/element-plus/node_modules/.bin/browserslist +17 -0
  143. package/templates/vue/features/element-plus/node_modules/.bin/jiti +17 -0
  144. package/templates/vue/features/element-plus/node_modules/.bin/parser +17 -0
  145. package/templates/vue/features/element-plus/node_modules/.bin/rollup +17 -0
  146. package/templates/vue/features/element-plus/node_modules/.bin/sass +17 -0
  147. package/templates/vue/features/element-plus/node_modules/.bin/terser +17 -0
  148. package/templates/vue/features/element-plus/node_modules/.bin/tsx +17 -0
  149. package/templates/vue/features/element-plus/node_modules/.bin/vite +17 -0
  150. package/templates/vue/features/element-plus/node_modules/.bin/yaml +17 -0
  151. package/templates/vue/features/element-plus/package.json +4 -0
  152. package/templates/vue/features/element-plus/src/assets/styles/main.scss +0 -1
  153. package/templates/vue/features/element-plus/src/layouts/element.vue +1 -1
  154. package/templates/vue/features/element-plus/src/stores/modules/system.ts +1 -1
  155. package/templates/vue/features/element-plus/tsconfig.app.json +33 -0
  156. package/templates/vue/features/element-plus/tsconfig.base.json +25 -0
  157. package/templates/vue/features/element-plus/tsconfig.json +12 -0
  158. package/templates/vue/features/element-plus/tsconfig.node.json +14 -0
  159. package/templates/vue/features/element-plus/vite/features/element-plus.ts +13 -18
  160. package/templates/vue/features/i18n/tsconfig.app.json +33 -0
  161. package/templates/vue/features/i18n/tsconfig.base.json +25 -0
  162. package/templates/vue/features/i18n/tsconfig.json +12 -0
  163. package/templates/vue/features/i18n/tsconfig.node.json +14 -0
  164. package/templates/vue/features/manualRoutes/package.json +2 -1
  165. package/templates/vue/features/manualRoutes/src/layouts/index.ts +26 -0
  166. package/templates/vue/features/manualRoutes/src/router/index.ts +1 -1
  167. package/templates/vue/features/manualRoutes/src/stores/modules/system.ts +1 -1
  168. package/templates/vue/features/manualRoutes/tsconfig.app.json +33 -0
  169. package/templates/vue/features/manualRoutes/tsconfig.base.json +25 -0
  170. package/templates/vue/features/manualRoutes/tsconfig.json +12 -0
  171. package/templates/vue/features/manualRoutes/tsconfig.node.json +14 -0
  172. package/templates/vue/features/pageRoutes/node_modules/.bin/browserslist +17 -0
  173. package/templates/vue/features/pageRoutes/node_modules/.bin/jiti +17 -0
  174. package/templates/vue/features/pageRoutes/node_modules/.bin/parser +17 -0
  175. package/templates/vue/features/pageRoutes/node_modules/.bin/rollup +17 -0
  176. package/templates/vue/features/pageRoutes/node_modules/.bin/sass +17 -0
  177. package/templates/vue/features/pageRoutes/node_modules/.bin/terser +17 -0
  178. package/templates/vue/features/pageRoutes/node_modules/.bin/tsx +17 -0
  179. package/templates/vue/features/pageRoutes/node_modules/.bin/vite +17 -0
  180. package/templates/vue/features/pageRoutes/node_modules/.bin/yaml +17 -0
  181. package/templates/vue/features/pageRoutes/package.json +4 -1
  182. package/templates/vue/features/pageRoutes/src/layouts/index.ts +26 -0
  183. package/templates/vue/features/pageRoutes/src/stores/modules/system.ts +1 -1
  184. package/templates/vue/features/pageRoutes/tsconfig.app.json +33 -0
  185. package/templates/vue/features/pageRoutes/tsconfig.base.json +25 -0
  186. package/templates/vue/features/pageRoutes/tsconfig.json +12 -0
  187. package/templates/vue/features/pageRoutes/tsconfig.node.json +14 -0
  188. package/templates/vue/features/pageRoutes/vite/features/pageRoutes.ts +15 -0
  189. package/templates/vue/features/pinia/package.json +3 -0
  190. package/templates/vue/features/pinia/src/stores/modules/system.ts +1 -1
  191. package/templates/vue/features/pinia/tsconfig.app.json +33 -0
  192. package/templates/vue/features/pinia/tsconfig.base.json +25 -0
  193. package/templates/vue/features/pinia/tsconfig.json +12 -0
  194. package/templates/vue/features/pinia/tsconfig.node.json +14 -0
  195. package/templates/vue/features/sentry/node_modules/.bin/browserslist +17 -0
  196. package/templates/vue/features/sentry/node_modules/.bin/jiti +17 -0
  197. package/templates/vue/features/sentry/node_modules/.bin/parser +17 -0
  198. package/templates/vue/features/sentry/node_modules/.bin/rollup +17 -0
  199. package/templates/vue/features/sentry/node_modules/.bin/sass +17 -0
  200. package/templates/vue/features/sentry/node_modules/.bin/terser +17 -0
  201. package/templates/vue/features/sentry/node_modules/.bin/tsx +17 -0
  202. package/templates/vue/features/sentry/node_modules/.bin/vite +17 -0
  203. package/templates/vue/features/sentry/node_modules/.bin/yaml +17 -0
  204. package/templates/vue/features/sentry/package.json +3 -0
  205. package/templates/vue/features/sentry/tsconfig.app.json +33 -0
  206. package/templates/vue/features/sentry/tsconfig.base.json +25 -0
  207. package/templates/vue/features/sentry/tsconfig.json +12 -0
  208. package/templates/vue/features/sentry/tsconfig.node.json +14 -0
  209. package/templates/vue/features/sentry/vite/features/sentry.ts +19 -25
  210. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/browserslist +17 -0
  211. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/jiti +2 -2
  212. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/parser +17 -0
  213. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/rollup +17 -0
  214. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/sass +4 -4
  215. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/terser +4 -4
  216. package/templates/vue/micro-frontends/qiankun/base/node_modules/.bin/vite +2 -2
  217. package/templates/vue/micro-frontends/qiankun/base/package.json +6 -1
  218. package/templates/vue/micro-frontends/qiankun/base/src/App.vue +13 -0
  219. package/templates/vue/micro-frontends/qiankun/base/src/assets/fonts/index.css +6 -0
  220. package/templates/vue/micro-frontends/qiankun/base/src/assets/styles/base.scss +33 -0
  221. package/templates/vue/micro-frontends/qiankun/base/src/assets/styles/custom.scss +20 -0
  222. package/templates/vue/micro-frontends/qiankun/base/src/assets/styles/main.scss +8 -0
  223. package/templates/vue/micro-frontends/qiankun/base/src/assets/styles/tailwind.scss +3 -0
  224. package/templates/vue/micro-frontends/qiankun/base/src/directives/index.ts +36 -0
  225. package/templates/vue/micro-frontends/qiankun/base/src/main.ts +5 -5
  226. package/templates/vue/micro-frontends/qiankun/base/src/router/index.ts +27 -0
  227. package/templates/vue/micro-frontends/qiankun/base/src/stores/index.ts +8 -0
  228. package/templates/vue/micro-frontends/qiankun/base/tsconfig.app.json +33 -0
  229. package/templates/vue/micro-frontends/qiankun/base/tsconfig.base.json +25 -0
  230. package/templates/vue/micro-frontends/qiankun/base/tsconfig.json +12 -0
  231. package/templates/vue/micro-frontends/qiankun/base/tsconfig.node.json +14 -0
  232. package/templates/vue/micro-frontends/qiankun/base/vite/index.ts +19 -18
  233. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/browserslist +17 -0
  234. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/parser +17 -0
  235. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/rollup +17 -0
  236. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/sass +4 -4
  237. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/terser +4 -4
  238. package/templates/vue/micro-frontends/qiankun/features/element-plus/node_modules/.bin/vite +4 -4
  239. package/templates/vue/micro-frontends/qiankun/features/element-plus/package.json +4 -0
  240. package/templates/vue/micro-frontends/qiankun/features/element-plus/src/assets/styles/main.scss +0 -1
  241. package/templates/vue/micro-frontends/qiankun/features/element-plus/src/stores/modules/system.ts +1 -1
  242. package/templates/vue/micro-frontends/qiankun/features/element-plus/tsconfig.app.json +33 -0
  243. package/templates/vue/micro-frontends/qiankun/features/element-plus/tsconfig.base.json +25 -0
  244. package/templates/vue/micro-frontends/qiankun/features/element-plus/tsconfig.json +12 -0
  245. package/templates/vue/micro-frontends/qiankun/features/element-plus/tsconfig.node.json +14 -0
  246. package/templates/vue/micro-frontends/qiankun/features/element-plus/vite/features/element-plus.ts +13 -18
  247. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/sass +4 -4
  248. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/terser +4 -4
  249. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/node_modules/.bin/vite +4 -4
  250. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/package.json +2 -1
  251. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/layouts/index.ts +26 -0
  252. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/src/stores/modules/system.ts +1 -1
  253. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/tsconfig.app.json +33 -0
  254. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/tsconfig.base.json +25 -0
  255. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/tsconfig.json +12 -0
  256. package/templates/vue/micro-frontends/qiankun/features/manualRoutes/tsconfig.node.json +14 -0
  257. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/browserslist +17 -0
  258. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/parser +17 -0
  259. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/rollup +17 -0
  260. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/sass +4 -4
  261. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/terser +4 -4
  262. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/node_modules/.bin/vite +4 -4
  263. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/package.json +4 -1
  264. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/src/stores/modules/system.ts +1 -1
  265. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/tsconfig.app.json +33 -0
  266. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/tsconfig.base.json +25 -0
  267. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/tsconfig.json +12 -0
  268. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/tsconfig.node.json +14 -0
  269. package/templates/vue/micro-frontends/qiankun/features/pageRoutes/vite/features/pageRoutes.ts +15 -0
  270. package/dist/test.d.ts +0 -5
  271. package/dist/test.js +0 -508
  272. package/templates/common/base/src/utils/index.ts +0 -87
  273. /package/templates/vue/features/element-plus/src/assets/styles/{element.scss → element/index.scss} +0 -0
@@ -3,41 +3,32 @@
3
3
  * 基于 @moluoxixi/ajax-package 的请求工具
4
4
  */
5
5
 
6
- import { createRequest } from '@moluoxixi/ajax-package'
6
+ import { BaseApi } from '@moluoxixi/ajax-package'
7
7
 
8
- /** 请求实例 */
9
- export const request = createRequest({
10
- baseURL: import.meta.env.VITE_API_BASE_URL,
11
- timeout: 30000,
12
- headers: {
13
- 'Content-Type': 'application/json',
14
- },
15
- })
8
+ /**
9
+ * 自定义 API
10
+ * 继承 BaseApi 并扩展请求处理逻辑
11
+ */
12
+ class RequestApi extends BaseApi {
13
+ constructor(config = {}) {
14
+ super({
15
+ baseURL: import.meta.env.VITE_API_BASE_URL || '',
16
+ timeout: import.meta.env.VITE_TIMEOUT || 30000,
17
+ ...config,
18
+ })
19
+ }
16
20
 
17
- /** 请求拦截器 */
18
- request.interceptors.request.use(
19
- (config) => {
20
- const token = localStorage.getItem('token')
21
- if (token) {
22
- config.headers.Authorization = `Bearer ${token}`
23
- }
21
+ /**
22
+ * 处理请求配置
23
+ * 在请求发送之前进行一些处理
24
+ * 对应旧代码的请求拦截器逻辑
25
+ */
26
+ processRequestConfig(config: any) {
24
27
  return config
25
- },
26
- (error) => {
27
- return Promise.reject(error)
28
- },
29
- )
28
+ }
29
+ }
30
30
 
31
- /** 响应拦截器 */
32
- request.interceptors.response.use(
33
- (response) => {
34
- return response.data
35
- },
36
- (error) => {
37
- // 统一错误处理
38
- console.error('Request error:', error)
39
- return Promise.reject(error)
40
- },
41
- )
31
+ /** 请求实例 */
32
+ export const request = new RequestApi()
42
33
 
43
34
  export default request
@@ -10,9 +10,9 @@ import type {
10
10
  ListResponseType,
11
11
  PaginationParamsType,
12
12
  UpdateExampleParamsType,
13
- } from '../types'
13
+ } from '@/apis/types'
14
14
 
15
- import request from '../request'
15
+ import request from '@/apis/request'
16
16
 
17
17
  /**
18
18
  * 获取示例列表
@@ -3,9 +3,9 @@
3
3
  * 用户相关 API
4
4
  */
5
5
 
6
- import type { ApiResponseType, LoginParamsType, LoginResponseType, UserInfoType } from '../types'
6
+ import type { ApiResponseType, LoginParamsType, LoginResponseType, UserInfoType } from '@/apis/types'
7
7
 
8
- import request from '../request'
8
+ import request from '@/apis/request'
9
9
 
10
10
  /**
11
11
  * 用户登录
@@ -0,0 +1,25 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "lib": [
5
+ "DOM",
6
+ "ESNext"
7
+ ],
8
+ "types": [
9
+ "vite/client"
10
+ ],
11
+ "composite": true,
12
+ "baseUrl": ".",
13
+ "paths": {
14
+ "@/*": ["./src/*"]
15
+ }
16
+ },
17
+ "include": ["src"],
18
+ "exclude": [
19
+ "dist",
20
+ "node_modules",
21
+ "cypress",
22
+ "vite",
23
+ "vite.config.*"
24
+ ]
25
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "lib": ["ESNext"],
7
+ "skipLibCheck": true,
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "noEmit": true,
14
+ "composite": true,
15
+ "declaration": true
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.app.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.node.json"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "allowImportingTsExtensions": true,
6
+ "rewriteRelativeImportExtensions": true,
7
+ "types": ["node"],
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "vite",
12
+ "vite.config.*"
13
+ ]
14
+ }
@@ -3,29 +3,18 @@ import path from 'node:path'
3
3
  import { fileURLToPath } from 'node:url'
4
4
  import { mergeConfig } from 'vite'
5
5
  import type { UserConfig } from 'vite'
6
+ import type { ViteConfigType, ViteFeatureContext } from '@moluoxixi/vite-config'
6
7
  import { createJiti } from 'jiti'
7
8
 
8
9
  const __dirname = path.dirname(fileURLToPath(import.meta.url))
9
10
  const _require = createJiti(import.meta.url, { interopDefault: true })
10
11
 
11
- /**
12
- * Vite feature 配置上下文
13
- */
14
- export interface ViteFeatureContext {
15
- /** Vite 环境变量 */
16
- viteEnv: Record<string, any>
17
- /** 构建模式 */
18
- mode: string
19
- /** 应用代码 */
20
- appCode: string
21
- }
22
-
23
12
  /**
24
13
  * 加载所有 feature 的 Vite 配置
25
14
  * @param ctx - feature 配置上下文
26
- * @returns 合并后的 UserConfig
15
+ * @returns 合并后的 Config 配置(与 ViteConfigType 结构一致)
27
16
  */
28
- export function loadFeatureConfigs(ctx: ViteFeatureContext): UserConfig {
17
+ export function loadFeatureConfigs(ctx: ViteFeatureContext): Partial<ViteConfigType> {
29
18
  const featuresDir = path.resolve(__dirname, 'features')
30
19
 
31
20
  if (!fs.existsSync(featuresDir)) {
@@ -33,15 +22,22 @@ export function loadFeatureConfigs(ctx: ViteFeatureContext): UserConfig {
33
22
  }
34
23
 
35
24
  const featureFiles = fs.readdirSync(featuresDir).filter(f => f.endsWith('.ts'))
36
- const configs: UserConfig[] = []
25
+ const viteConfigs: UserConfig[] = []
26
+ let mergedConfig: Partial<ViteConfigType> = {}
37
27
 
38
28
  for (const file of featureFiles) {
39
29
  try {
40
30
  const filePath = path.resolve(featuresDir, file)
41
31
  const mod = _require(filePath)
42
- const config = mod.default(ctx)
32
+ const config = mod.default(ctx) as Partial<ViteConfigType> | undefined
43
33
  if (config) {
44
- configs.push(config)
34
+ // 提取 viteConfig 单独合并
35
+ const { viteConfig, ...restConfig } = config
36
+ if (viteConfig && typeof viteConfig !== 'function') {
37
+ viteConfigs.push(viteConfig)
38
+ }
39
+ // 合并其他配置(pageRoutes, autoComponent 等)
40
+ mergedConfig = { ...mergedConfig, ...restConfig }
45
41
  }
46
42
  }
47
43
  catch (e) {
@@ -49,5 +45,10 @@ export function loadFeatureConfigs(ctx: ViteFeatureContext): UserConfig {
49
45
  }
50
46
  }
51
47
 
52
- return configs.reduce((acc, cfg) => mergeConfig(acc, cfg), {} as UserConfig)
48
+ // 合并所有 viteConfig
49
+ if (viteConfigs.length > 0) {
50
+ mergedConfig.viteConfig = viteConfigs.reduce((acc, cfg) => mergeConfig(acc, cfg), {} as UserConfig)
51
+ }
52
+
53
+ return mergedConfig
53
54
  }
@@ -5,15 +5,15 @@ import { loadEnv, mergeConfig } from 'vite'
5
5
  import process from 'node:process'
6
6
  import { loadFeatureConfigs } from './vite/index.ts'
7
7
 
8
- const config: ReturnType<typeof ViteConfig> = ViteConfig(({ mode }) => {
9
- const env = loadEnv(mode!, process.cwd())
8
+ const config = ViteConfig(({ mode }) => {
9
+ const env = loadEnv(mode, process.cwd())
10
10
  const viteEnv = wrapperEnv(env)
11
11
  const rootPath = path.resolve()
12
12
  const appCode = viteEnv.VITE_APP_CODE
13
13
  const appTitle = viteEnv.VITE_APP_TITLE
14
14
  const port = viteEnv.VITE_APP_PORT
15
15
 
16
- // 加载所有 feature 配置
16
+ // 加载所有 feature 配置(与 ViteConfigType 结构一致)
17
17
  const featureConfig = loadFeatureConfigs({ viteEnv, mode, appCode })
18
18
 
19
19
  return {
@@ -22,8 +22,12 @@ const config: ReturnType<typeof ViteConfig> = ViteConfig(({ mode }) => {
22
22
  appCode,
23
23
  port,
24
24
  autoComponent: true,
25
+ ...featureConfig,
25
26
  viteConfig: mergeConfig(
26
27
  {
28
+ build: {
29
+ outDir: 'dist',
30
+ },
27
31
  server: {
28
32
  proxy: {
29
33
  '/api': {
@@ -46,7 +50,7 @@ const config: ReturnType<typeof ViteConfig> = ViteConfig(({ mode }) => {
46
50
  },
47
51
  },
48
52
  },
49
- featureConfig,
53
+ featureConfig.viteConfig ?? {},
50
54
  ),
51
55
  }
52
56
  })
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../../node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vitest@4.0.18_@types+node@22.19.7_@vitest+ui@4.0.18_jiti@2.6.1_lightningcss@1.30.2_sass_d17507a774b1e9edf37b6f09226c02cf/node_modules/vitest/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vitest@4.0.18_@types+node@22.19.7_@vitest+ui@4.0.18_jiti@2.6.1_lightningcss@1.30.2_sass_d17507a774b1e9edf37b6f09226c02cf/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vitest@4.0.18_@types+node@22.19.7_@vitest+ui@4.0.18_jiti@2.6.1_lightningcss@1.30.2_sass_d17507a774b1e9edf37b6f09226c02cf/node_modules/vitest/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vitest@4.0.18_@types+node@22.19.7_@vitest+ui@4.0.18_jiti@2.6.1_lightningcss@1.30.2_sass_d17507a774b1e9edf37b6f09226c02cf/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/vitest@4.0.18_@types+node@22.19.7_@vitest+ui@4.0.18_jiti@2.6.1_lightningcss@1.30.2_sass_d17507a774b1e9edf37b6f09226c02cf/node_modules/vitest/vitest.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../../node_modules/.pnpm/vitest@4.0.18_@types+node@22.19.7_@vitest+ui@4.0.18_jiti@2.6.1_lightningcss@1.30.2_sass_d17507a774b1e9edf37b6f09226c02cf/node_modules/vitest/vitest.mjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
6
+ esac
7
+
8
+ if [ -z "$NODE_PATH" ]; then
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
+ else
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/yaml@2.8.2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
+ fi
13
+ if [ -x "$basedir/node" ]; then
14
+ exec "$basedir/node" "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
15
+ else
16
+ exec node "$basedir/../../../../../../node_modules/.pnpm/yaml@2.8.2/node_modules/yaml/bin.mjs" "$@"
17
+ fi
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "lib": ["ESNext"],
7
+ "skipLibCheck": true,
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "noEmit": true,
14
+ "composite": true,
15
+ "declaration": true
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "allowImportingTsExtensions": true,
6
+ "rewriteRelativeImportExtensions": true,
7
+ "types": ["node"],
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "eslint.config.*"
12
+ ]
13
+ }
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env sh
2
2
  . "$(dirname -- "$0")/_/husky.sh"
3
3
 
4
- pnpm lint-staged
4
+ npx --no-install lint-staged
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../commitizen/bin/commitizen" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.5_typescript@5.8.3/node_modules/@commitlint/cli/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.5_typescript@5.8.3/node_modules/@commitlint/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.7_typescript@5.8.3/node_modules/@commitlint/cli/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.7_typescript@5.8.3/node_modules/@commitlint/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.5_typescript@5.8.3/node_modules/@commitlint/cli/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.5_typescript@5.8.3/node_modules/@commitlint/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.7_typescript@5.8.3/node_modules/@commitlint/cli/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.7_typescript@5.8.3/node_modules/@commitlint/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/@commitlint+cli@19.8.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../@commitlint/cli/cli.js" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../commitizen/bin/git-cz" "$@"
@@ -6,9 +6,9 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.5_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules/commitizen/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/commitizen@4.3.1_@types+node@22.19.7_typescript@5.8.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
14
  exec "$basedir/node" "$basedir/../commitizen/bin/git-cz" "$@"
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ESNext",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "lib": ["ESNext"],
7
+ "skipLibCheck": true,
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "noEmit": true,
14
+ "composite": true,
15
+ "declaration": true
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.node.json"
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "allowImportingTsExtensions": true,
6
+ "rewriteRelativeImportExtensions": true,
7
+ "types": ["node"],
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "commitlint.config.*"
12
+ ]
13
+ }
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.2/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.2/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.2/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules/sass/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/sass@1.97.3/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/sass@1.97.2/node_modules/sass/sass.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/sass@1.97.2/node_modules/sass/sass.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/sass@1.97.3/node_modules/sass/sass.js" "$@"
17
17
  fi
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.44.1/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/terser@5.46.0/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/terser@5.44.1/node_modules/terser/bin/terser" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/terser" "$@"
17
17
  fi
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules/vite/bin/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules/vite/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules:/home/runner/work/vite-cli/vite-cli/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules/vite/bin/vite.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules/vite/bin/vite.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vite@7.1.11_@types+node@22.19.5_jiti@2.6.1_lightningcss@1.30.1_sass-embedded@1.97.2_sas_49350b20785856445dede0a62779c9d5/node_modules/vite/bin/vite.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vite@6.2.4_@types+node@22.19.7_jiti@2.6.1_lightningcss@1.30.2_sass-embedded@1.97.3_sass_8b0a8c2ec890dd5cbc7f2dee3cda2529/node_modules/vite/bin/vite.js" "$@"
17
17
  fi
@@ -5,7 +5,8 @@
5
5
  },
6
6
  "dependencies": {
7
7
  "react": "^18.3.1",
8
- "react-dom": "^18.3.1"
8
+ "react-dom": "^18.3.1",
9
+ "react-router-dom": "^7.1.3"
9
10
  },
10
11
  "devDependencies": {
11
12
  "@types/react": "^18.3.18",
@@ -7,7 +7,7 @@ import React from 'react'
7
7
  import ReactDOM from 'react-dom/client'
8
8
  import { RouterProvider } from 'react-router-dom'
9
9
  import { createRouter } from '@/router'
10
- import { setupFeatures } from './main/index'
10
+ import { setupFeatures } from '@/main/index'
11
11
 
12
12
  // Import styles
13
13
  import '@/assets/styles/main.scss'