create-young-proj 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/CHANGELOG.md +95 -1
  2. package/README.md +6 -1
  3. package/dist/index.mjs +19 -19
  4. package/package.json +1 -1
  5. package/src/index.ts +6 -1
  6. package/template-admin-server/src/service/role.service.ts +5 -3
  7. package/template-big-screen/.editorconfig +14 -0
  8. package/template-big-screen/.nvmrc +1 -0
  9. package/template-big-screen/.vscode/extensions.json +12 -0
  10. package/template-big-screen/.vscode/settings.json +39 -0
  11. package/template-big-screen/Dockerfile +49 -0
  12. package/template-big-screen/README.md +20 -0
  13. package/template-big-screen/_gitignore +23 -0
  14. package/template-big-screen/_npmrc +2 -0
  15. package/template-big-screen/_nvmrc +1 -0
  16. package/template-big-screen/boot.mjs +16 -0
  17. package/template-big-screen/config/.devrc +1 -0
  18. package/template-big-screen/config/.onlinerc +1 -0
  19. package/template-big-screen/config/.testrc +1 -0
  20. package/template-big-screen/eslint.config.js +34 -0
  21. package/template-big-screen/index.html +48 -0
  22. package/template-big-screen/nitro.config.ts +23 -0
  23. package/template-big-screen/package.json +66 -0
  24. package/template-big-screen/plugins/init.ts +57 -0
  25. package/template-big-screen/public/favicon.svg +3 -0
  26. package/template-big-screen/routes/api/[...all].ts +19 -0
  27. package/template-big-screen/routes/get/env.ts +13 -0
  28. package/template-big-screen/src/App.vue +24 -0
  29. package/template-big-screen/src/apis/get.ts +77 -0
  30. package/template-big-screen/src/apis/index.ts +53 -0
  31. package/template-big-screen/src/apis/post.ts +14 -0
  32. package/template-big-screen/src/assets/data/china.json +1 -0
  33. package/template-big-screen/src/components/YoungCountUp.vue +29 -0
  34. package/template-big-screen/src/components/YoungECharts/config.ts +56 -0
  35. package/template-big-screen/src/components/YoungECharts/index.vue +111 -0
  36. package/template-big-screen/src/components/YoungHeader.vue +54 -0
  37. package/template-big-screen/src/components/YoungSectionContainer.vue +55 -0
  38. package/template-big-screen/src/components/YoungSectionHeader.vue +23 -0
  39. package/template-big-screen/src/composables/breakPoint.ts +20 -0
  40. package/template-big-screen/src/composables/dark.ts +52 -0
  41. package/template-big-screen/src/composables/echarts.ts +17 -0
  42. package/template-big-screen/src/composables/loadData.ts +38 -0
  43. package/template-big-screen/src/directives/ellipsis.ts +20 -0
  44. package/template-big-screen/src/directives/index.ts +13 -0
  45. package/template-big-screen/src/enums/breakpointEnum.ts +9 -0
  46. package/template-big-screen/src/layouts/404.vue +19 -0
  47. package/template-big-screen/src/layouts/blank.vue +9 -0
  48. package/template-big-screen/src/layouts/default.vue +17 -0
  49. package/template-big-screen/src/main.ts +59 -0
  50. package/template-big-screen/src/modules/index.ts +8 -0
  51. package/template-big-screen/src/modules/pinia.ts +11 -0
  52. package/template-big-screen/src/modules/router.ts +28 -0
  53. package/template-big-screen/src/pages/[...all].vue +16 -0
  54. package/template-big-screen/src/pages/electricity/build.vue +135 -0
  55. package/template-big-screen/src/pages/electricity/reliability.vue +137 -0
  56. package/template-big-screen/src/pages/electricity/sale-and-cost.vue +158 -0
  57. package/template-big-screen/src/pages/index.vue +59 -0
  58. package/template-big-screen/src/pages/kpi.vue +129 -0
  59. package/template-big-screen/src/pages/manage-improve.vue +114 -0
  60. package/template-big-screen/src/pages/social/condition.vue +202 -0
  61. package/template-big-screen/src/pages/social/electricity-usage.vue +140 -0
  62. package/template-big-screen/src/styles/index.scss +82 -0
  63. package/template-big-screen/tsconfig.json +38 -0
  64. package/template-big-screen/types/auto-imports.d.ts +949 -0
  65. package/template-big-screen/types/components.d.ts +19 -0
  66. package/template-big-screen/types/echarts.d.ts +36 -0
  67. package/template-big-screen/types/index.d.ts +45 -0
  68. package/template-big-screen/types/type.d.ts +38 -0
  69. package/template-big-screen/uno.config.ts +68 -0
  70. package/template-big-screen/vite.config.ts +131 -0
  71. package/template-big-screen/yarn.lock +7443 -0
  72. package/template-nuxt-admin/README.md +3 -3
  73. package/template-nuxt-admin/boot.mjs +4 -1
  74. package/template-nuxt-admin/composables/config.ts +2 -2
  75. package/template-nuxt-admin/config/.devrc +1 -1
  76. package/template-nuxt-admin/config/.onlinerc +1 -1
  77. package/template-nuxt-admin/config/.testrc +1 -1
  78. package/template-nuxt-admin/nuxt.config.ts +14 -5
  79. package/template-nuxt-admin/package.json +12 -11
  80. package/template-nuxt-admin/pages/system/api.vue +6 -6
  81. package/template-nuxt-admin/pages/system/role.vue +4 -4
  82. package/template-nuxt-admin/pages/system/user.vue +4 -4
  83. package/template-nuxt-admin/server/api/[...all].ts +10 -3
  84. package/template-nuxt-admin/server/plugins/env.ts +5 -4
  85. package/template-nuxt-admin/uno.config.ts +1 -9
  86. package/template-nuxt-admin/yarn.lock +3659 -3363
  87. package/template-nuxt-mobile/package.json +1 -0
  88. package/template-nuxt-mobile/server/utils/proxy.ts +1 -30
  89. package/template-nuxt-mobile/yarn.lock +9 -0
  90. package/template-nuxt-website/package.json +1 -0
  91. package/template-nuxt-website/server/utils/proxy.ts +1 -30
  92. package/template-nuxt-website/yarn.lock +9 -0
  93. package/template-nuxt-admin/server/utils/index.ts +0 -36
@@ -17,6 +17,7 @@
17
17
  "@bluesyoung/logger": "^0.0.1",
18
18
  "@bluesyoung/utils": "^0.2.1",
19
19
  "c12": "^1.4.2",
20
+ "h3-proxy": "^1.12.0",
20
21
  "http-proxy": "^1.18.1"
21
22
  },
22
23
  "devDependencies": {
@@ -1,40 +1,11 @@
1
1
  /*
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-09-27 11:22:08
4
- * @LastEditTime: 2023-11-01 19:10:45
4
+ * @LastEditTime: 2024-03-08 15:04:57
5
5
  * @Description:
6
6
  */
7
- import type { ServerOptions as HTTPProxyOptions } from 'http-proxy'
8
- import ProxyModule from 'http-proxy'
9
7
  import type { H3Event } from 'h3'
10
8
 
11
- /**
12
- * @param target 接口代理的具体地址
13
- * @param defaults 代理配置
14
- * @example
15
- * export default defineEventHandler(async (event) => {
16
- * const proxy = createTransparentProxy(`http://127.0.0.1:3333`);
17
- * await proxy.handle(event);
18
- * });
19
- */
20
- export function createTransparentProxy(target: string, defaults: HTTPProxyOptions = {}) {
21
- const proxy = ProxyModule.createProxy()
22
- const handle = (event: H3Event, opts: HTTPProxyOptions = {}) => {
23
- return new Promise<void>((resolve, reject) => {
24
- proxy.web(event.node.req, event.node.res, { target, ...defaults, ...opts }, (error: any) => {
25
- if (error.code !== 'ECONNRESET')
26
- reject(error)
27
-
28
- resolve()
29
- })
30
- })
31
- }
32
- return {
33
- proxy,
34
- handle,
35
- }
36
- }
37
-
38
9
  /**
39
10
  * 服务端发送的请求
40
11
  */
@@ -4232,6 +4232,15 @@ gzip-size@^7.0.0:
4232
4232
  dependencies:
4233
4233
  duplexer "^0.1.2"
4234
4234
 
4235
+ h3-proxy@^1.12.0:
4236
+ version "1.12.0"
4237
+ resolved "https://registry.npmmirror.com/h3-proxy/-/h3-proxy-1.12.0.tgz#2a25c6df3fae63e8a1183ba234cd100038e0d4ca"
4238
+ integrity sha512-nvYRfRVPyU2Nt3Z5gZoAPp8swUH6XTltV6mRQUnTJHc9UulYcCVyQCZX32tJdGESDvurE18WtjXT8sWWioCzFw==
4239
+ dependencies:
4240
+ consola "^3.2.3"
4241
+ is-glob "^4.0.3"
4242
+ micromatch "^4.0.5"
4243
+
4235
4244
  h3@^1.6.6, h3@^1.8.1, h3@^1.8.2:
4236
4245
  version "1.8.2"
4237
4246
  resolved "https://registry.npmmirror.com/h3/-/h3-1.8.2.tgz#69ea8ca0285c1bb268cd08b9a7017e02939f88b7"
@@ -16,6 +16,7 @@
16
16
  "@bluesyoung/logger": "^0.0.1",
17
17
  "@bluesyoung/utils": "^0.2.1",
18
18
  "c12": "^1.4.2",
19
+ "h3-proxy": "^1.12.0",
19
20
  "http-proxy": "^1.18.1"
20
21
  },
21
22
  "devDependencies": {
@@ -1,40 +1,11 @@
1
1
  /*
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-09-27 11:22:08
4
- * @LastEditTime: 2023-11-01 19:10:45
4
+ * @LastEditTime: 2024-03-08 15:05:53
5
5
  * @Description:
6
6
  */
7
- import type { ServerOptions as HTTPProxyOptions } from 'http-proxy'
8
- import ProxyModule from 'http-proxy'
9
7
  import type { H3Event } from 'h3'
10
8
 
11
- /**
12
- * @param target 接口代理的具体地址
13
- * @param defaults 代理配置
14
- * @example
15
- * export default defineEventHandler(async (event) => {
16
- * const proxy = createTransparentProxy(`http://127.0.0.1:3333`);
17
- * await proxy.handle(event);
18
- * });
19
- */
20
- export function createTransparentProxy(target: string, defaults: HTTPProxyOptions = {}) {
21
- const proxy = ProxyModule.createProxy()
22
- const handle = (event: H3Event, opts: HTTPProxyOptions = {}) => {
23
- return new Promise<void>((resolve, reject) => {
24
- proxy.web(event.node.req, event.node.res, { target, ...defaults, ...opts }, (error: any) => {
25
- if (error.code !== 'ECONNRESET')
26
- reject(error)
27
-
28
- resolve()
29
- })
30
- })
31
- }
32
- return {
33
- proxy,
34
- handle,
35
- }
36
- }
37
-
38
9
  /**
39
10
  * 服务端发送的请求
40
11
  */
@@ -4146,6 +4146,15 @@ gzip-size@^7.0.0:
4146
4146
  dependencies:
4147
4147
  duplexer "^0.1.2"
4148
4148
 
4149
+ h3-proxy@^1.12.0:
4150
+ version "1.12.0"
4151
+ resolved "https://registry.npmmirror.com/h3-proxy/-/h3-proxy-1.12.0.tgz#2a25c6df3fae63e8a1183ba234cd100038e0d4ca"
4152
+ integrity sha512-nvYRfRVPyU2Nt3Z5gZoAPp8swUH6XTltV6mRQUnTJHc9UulYcCVyQCZX32tJdGESDvurE18WtjXT8sWWioCzFw==
4153
+ dependencies:
4154
+ consola "^3.2.3"
4155
+ is-glob "^4.0.3"
4156
+ micromatch "^4.0.5"
4157
+
4149
4158
  h3@^1.6.6, h3@^1.8.1, h3@^1.8.2:
4150
4159
  version "1.8.2"
4151
4160
  resolved "https://registry.npmmirror.com/h3/-/h3-1.8.2.tgz#69ea8ca0285c1bb268cd08b9a7017e02939f88b7"
@@ -1,36 +0,0 @@
1
- /*
2
- * @Author: zhangyang
3
- * @Date: 2023-05-29 10:29:52
4
- * @LastEditTime: 2023-06-17 16:20:40
5
- * @Description:
6
- */
7
- import type { ServerOptions as HTTPProxyOptions } from 'http-proxy'
8
- import ProxyModule from 'http-proxy'
9
- import type { H3Event } from 'h3'
10
-
11
- /**
12
- * @param target 接口代理的具体地址
13
- * @param defaults 代理配置
14
- * @example
15
- * export default defineEventHandler(async (event) => {
16
- * const proxy = createTransparentProxy(`http://127.0.0.1:3333`);
17
- * await proxy.handle(event);
18
- * });
19
- */
20
- export function createTransparentProxy(target: string, defaults: HTTPProxyOptions = {}) {
21
- const proxy = ProxyModule.createProxy()
22
- const handle = (event: H3Event, opts: HTTPProxyOptions = {}) => {
23
- return new Promise<void>((resolve, reject) => {
24
- proxy.web(event.node.req, event.node.res, { target, ...defaults, ...opts }, (error: any) => {
25
- if (error.code !== 'ECONNRESET')
26
- reject(error)
27
-
28
- resolve()
29
- })
30
- })
31
- }
32
- return {
33
- proxy,
34
- handle,
35
- }
36
- }