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.
- package/CHANGELOG.md +95 -1
- package/README.md +6 -1
- package/dist/index.mjs +19 -19
- package/package.json +1 -1
- package/src/index.ts +6 -1
- package/template-admin-server/src/service/role.service.ts +5 -3
- package/template-big-screen/.editorconfig +14 -0
- package/template-big-screen/.nvmrc +1 -0
- package/template-big-screen/.vscode/extensions.json +12 -0
- package/template-big-screen/.vscode/settings.json +39 -0
- package/template-big-screen/Dockerfile +49 -0
- package/template-big-screen/README.md +20 -0
- package/template-big-screen/_gitignore +23 -0
- package/template-big-screen/_npmrc +2 -0
- package/template-big-screen/_nvmrc +1 -0
- package/template-big-screen/boot.mjs +16 -0
- package/template-big-screen/config/.devrc +1 -0
- package/template-big-screen/config/.onlinerc +1 -0
- package/template-big-screen/config/.testrc +1 -0
- package/template-big-screen/eslint.config.js +34 -0
- package/template-big-screen/index.html +48 -0
- package/template-big-screen/nitro.config.ts +23 -0
- package/template-big-screen/package.json +66 -0
- package/template-big-screen/plugins/init.ts +57 -0
- package/template-big-screen/public/favicon.svg +3 -0
- package/template-big-screen/routes/api/[...all].ts +19 -0
- package/template-big-screen/routes/get/env.ts +13 -0
- package/template-big-screen/src/App.vue +24 -0
- package/template-big-screen/src/apis/get.ts +77 -0
- package/template-big-screen/src/apis/index.ts +53 -0
- package/template-big-screen/src/apis/post.ts +14 -0
- package/template-big-screen/src/assets/data/china.json +1 -0
- package/template-big-screen/src/components/YoungCountUp.vue +29 -0
- package/template-big-screen/src/components/YoungECharts/config.ts +56 -0
- package/template-big-screen/src/components/YoungECharts/index.vue +111 -0
- package/template-big-screen/src/components/YoungHeader.vue +54 -0
- package/template-big-screen/src/components/YoungSectionContainer.vue +55 -0
- package/template-big-screen/src/components/YoungSectionHeader.vue +23 -0
- package/template-big-screen/src/composables/breakPoint.ts +20 -0
- package/template-big-screen/src/composables/dark.ts +52 -0
- package/template-big-screen/src/composables/echarts.ts +17 -0
- package/template-big-screen/src/composables/loadData.ts +38 -0
- package/template-big-screen/src/directives/ellipsis.ts +20 -0
- package/template-big-screen/src/directives/index.ts +13 -0
- package/template-big-screen/src/enums/breakpointEnum.ts +9 -0
- package/template-big-screen/src/layouts/404.vue +19 -0
- package/template-big-screen/src/layouts/blank.vue +9 -0
- package/template-big-screen/src/layouts/default.vue +17 -0
- package/template-big-screen/src/main.ts +59 -0
- package/template-big-screen/src/modules/index.ts +8 -0
- package/template-big-screen/src/modules/pinia.ts +11 -0
- package/template-big-screen/src/modules/router.ts +28 -0
- package/template-big-screen/src/pages/[...all].vue +16 -0
- package/template-big-screen/src/pages/electricity/build.vue +135 -0
- package/template-big-screen/src/pages/electricity/reliability.vue +137 -0
- package/template-big-screen/src/pages/electricity/sale-and-cost.vue +158 -0
- package/template-big-screen/src/pages/index.vue +59 -0
- package/template-big-screen/src/pages/kpi.vue +129 -0
- package/template-big-screen/src/pages/manage-improve.vue +114 -0
- package/template-big-screen/src/pages/social/condition.vue +202 -0
- package/template-big-screen/src/pages/social/electricity-usage.vue +140 -0
- package/template-big-screen/src/styles/index.scss +82 -0
- package/template-big-screen/tsconfig.json +38 -0
- package/template-big-screen/types/auto-imports.d.ts +949 -0
- package/template-big-screen/types/components.d.ts +19 -0
- package/template-big-screen/types/echarts.d.ts +36 -0
- package/template-big-screen/types/index.d.ts +45 -0
- package/template-big-screen/types/type.d.ts +38 -0
- package/template-big-screen/uno.config.ts +68 -0
- package/template-big-screen/vite.config.ts +131 -0
- package/template-big-screen/yarn.lock +7443 -0
- package/template-nuxt-admin/README.md +3 -3
- package/template-nuxt-admin/boot.mjs +4 -1
- package/template-nuxt-admin/composables/config.ts +2 -2
- package/template-nuxt-admin/config/.devrc +1 -1
- package/template-nuxt-admin/config/.onlinerc +1 -1
- package/template-nuxt-admin/config/.testrc +1 -1
- package/template-nuxt-admin/nuxt.config.ts +14 -5
- package/template-nuxt-admin/package.json +12 -11
- package/template-nuxt-admin/pages/system/api.vue +6 -6
- package/template-nuxt-admin/pages/system/role.vue +4 -4
- package/template-nuxt-admin/pages/system/user.vue +4 -4
- package/template-nuxt-admin/server/api/[...all].ts +10 -3
- package/template-nuxt-admin/server/plugins/env.ts +5 -4
- package/template-nuxt-admin/uno.config.ts +1 -9
- package/template-nuxt-admin/yarn.lock +3659 -3363
- package/template-nuxt-mobile/package.json +1 -0
- package/template-nuxt-mobile/server/utils/proxy.ts +1 -30
- package/template-nuxt-mobile/yarn.lock +9 -0
- package/template-nuxt-website/package.json +1 -0
- package/template-nuxt-website/server/utils/proxy.ts +1 -30
- package/template-nuxt-website/yarn.lock +9 -0
- package/template-nuxt-admin/server/utils/index.ts +0 -36
@@ -1,40 +1,11 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-09-27 11:22:08
|
4
|
-
* @LastEditTime:
|
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"
|
@@ -1,40 +1,11 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-09-27 11:22:08
|
4
|
-
* @LastEditTime:
|
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
|
-
}
|