提交 bc370862 作者: 方治民

refactor: 重构 pont 模板、统一 Mock 与正式环境的 API 响应包装类

上级 066e3038
*.sh *.sh
node_modules node_modules
*.md *.md
...@@ -13,3 +12,5 @@ dist ...@@ -13,3 +12,5 @@ dist
.local .local
/bin /bin
Dockerfile Dockerfile
types/auto-imports.d.ts
...@@ -7,3 +7,5 @@ ...@@ -7,3 +7,5 @@
**/*.sh **/*.sh
/public/* /public/*
types/auto-imports.d.ts
import type { Plugin } from 'vite'
// https://github.com/antfu/unplugin-auto-import
import AutoImport from 'unplugin-auto-import/vite'
/**
* unplugin-auto-import
* @returns Plugin
*/
export function configAutoImportPlugin(): Plugin {
return AutoImport({
dts: 'types/auto-imports.d.ts',
imports: ['vue', 'vue-router', { '/@/config/app': ['$app'] }, { '/@/api/services/mods': ['API'] }],
})
}
...@@ -16,6 +16,7 @@ import { configThemePlugin } from './theme' ...@@ -16,6 +16,7 @@ import { configThemePlugin } from './theme'
import { configImageminPlugin } from './imagemin' import { configImageminPlugin } from './imagemin'
import { configSvgIconsPlugin } from './svgSprite' import { configSvgIconsPlugin } from './svgSprite'
import { configOptimizePlugin } from './optimize' import { configOptimizePlugin } from './optimize'
import { configAutoImportPlugin } from './autoImport'
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
const { const {
...@@ -68,15 +69,16 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { ...@@ -68,15 +69,16 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
// vite-plugin-optimize-persist // vite-plugin-optimize-persist
vitePlugins.push(configOptimizePlugin()) vitePlugins.push(configOptimizePlugin())
// vite-plugin-auto-import
vitePlugins.push(configAutoImportPlugin())
// The following plugins only work in the production environment // The following plugins only work in the production environment
if (isBuild) { if (isBuild) {
// vite-plugin-imagemin // vite-plugin-imagemin
VITE_USE_IMAGEMIN && vitePlugins.push(configImageminPlugin()) VITE_USE_IMAGEMIN && vitePlugins.push(configImageminPlugin())
// rollup-plugin-gzip // rollup-plugin-gzip
vitePlugins.push( vitePlugins.push(configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE))
configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE),
)
// vite-plugin-pwa // vite-plugin-pwa
vitePlugins.push(configPwaConfig(viteEnv)) vitePlugins.push(configPwaConfig(viteEnv))
......
// Interface data format used to return a unified format import dayjs from 'dayjs'
import { MockMethod } from 'vite-plugin-mock'
export function resultSuccess<T = Recordable>(result: T, { message = 'ok' } = {}) { /**
return { * 构建 URL 请求地址
code: 0, * @param path 请求地址
result, * @returns 拼接 BASE_URL 后的请求地址
message, */
type: 'success', export const URL = (path: string): string => `/basic-api${path}`
}
}
export function resultPageSuccess<T = any>(page: number, pageSize: number, list: T[], { message = 'ok' } = {}) {
const pageData = pagination(page, pageSize, list)
/**
* 通用响应工具类
*/
export class Response {
/**
* 成功返回
* @param data 数据
* @param param 覆盖响应内容
* @returns 通用响应结果
*/
static ok<T = any>(data: T, { message = 'OK', code = 0 } = {}): defs.Result<T> {
return { return {
...resultSuccess({ code,
items: pageData,
total: list.length,
}),
message, message,
status: 200,
times: '0.0s',
timestamp: dayjs().format('yyyy-MM-dd HH:mm:ss'),
body: data,
}
} }
}
export function resultError(message = 'Request failed', { code = -1, result = null } = {}) { /**
* 失败返回
* @param message 失败的消息
* @param status 状态码
* @param param 覆盖响应内容
* @returns 通用响应结果
*/
static no(message = 'fail', { status = 400, code = -1, details = '' } = {}): defs.Result<string> {
return { return {
code, code,
result, status,
message, message,
type: 'error', details,
times: '0.0s',
timestamp: dayjs().format('yyyy-MM-dd HH:mm:ss'),
body: null,
}
} }
}
export function pagination<T = any>(pageNo: number, pageSize: number, array: T[]): T[] { /**
const offset = (pageNo - 1) * Number(pageSize) * 包装正常返回的 GET 请求 MockMethod
const ret = * @param url 请求地址
offset + Number(pageSize) >= array.length * @param data 响应数据
? array.slice(offset, array.length) * @returns 经过包装的 MockMethod
: array.slice(offset, offset + Number(pageSize)) */
return ret static getOk<T = any>(url: string, data: T): MockMethod {
return {
url: URL(url),
method: 'get',
response: () => {
return Response.ok(data)
},
}
}
} }
export interface requestParams { export class Request {
method: string method: string
body: any body: any
headers?: { authorization?: string } headers?: { authorization?: string }
query: any query: any
}
/** /**
* @description 本函数用于从request数据中获取token,请根据项目的实际情况修改 * 获取 Token 值
* * @param param 请求参数
* @returns token
*/ */
export function getRequestToken({ headers }: requestParams): string | undefined { static getRequestToken({ headers }: Request): string | undefined {
return headers?.authorization return headers?.authorization
}
} }
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { resultSuccess, resultError } from '../_util' import { Response } from '../_util'
import { ResultEnum } from '../../src/enums/httpEnum' import * as HTTP from '../../src/api/types'
const userInfo = { const userInfo = {
name: 'Vben', name: 'Basic',
userid: '00000001', userid: '00000001',
email: 'test@gmail.com', email: 'test@gmail.com',
signature: '海纳百川,有容乃大', signature: '海纳百川,有容乃大',
...@@ -49,7 +49,7 @@ export default [ ...@@ -49,7 +49,7 @@ export default [
timeout: 1000, timeout: 1000,
method: 'get', method: 'get',
response: () => { response: () => {
return resultSuccess(userInfo) return Response.ok(userInfo)
}, },
}, },
{ {
...@@ -57,7 +57,7 @@ export default [ ...@@ -57,7 +57,7 @@ export default [
method: 'post', method: 'post',
statusCode: 401, statusCode: 401,
response: () => { response: () => {
return resultError() return Response.no()
}, },
}, },
{ {
...@@ -65,7 +65,7 @@ export default [ ...@@ -65,7 +65,7 @@ export default [
method: 'post', method: 'post',
statusCode: 200, statusCode: 200,
response: () => { response: () => {
return resultError('Token Expired!', { code: ResultEnum.TIMEOUT as number }) return Response.no('Token Expired!', { status: HTTP.Status.UNAUTHORIZED })
}, },
}, },
] as MockMethod[] ] as MockMethod[]
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { resultSuccess } from '../_util' import { Response } from '../_util'
const areaList: any[] = [ const areaList: any[] = [
{ {
...@@ -317,9 +317,9 @@ export default [ ...@@ -317,9 +317,9 @@ export default [
response: ({ body }) => { response: ({ body }) => {
const { parentCode } = body || {} const { parentCode } = body || {}
if (!parentCode) { if (!parentCode) {
return resultSuccess(areaList.filter((it) => it.code === '430000')) return Response.ok(areaList.filter((it) => it.code === '430000'))
} }
return resultSuccess(areaList.filter((it) => it.parentCode === parentCode)) return Response.ok(areaList.filter((it) => it.parentCode === parentCode))
}, },
}, },
] as MockMethod[] ] as MockMethod[]
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { resultSuccess } from '../_util' import { Response } from '../_util'
const demoList = (keyword, count = 20) => { const demoList = (keyword, count = 20) => {
const result = { const result = {
...@@ -22,7 +22,7 @@ export default [ ...@@ -22,7 +22,7 @@ export default [
response: ({ query }) => { response: ({ query }) => {
const { keyword, count } = query const { keyword, count } = query
console.log(keyword) console.log(keyword)
return resultSuccess(demoList(keyword, count)) return Response.ok(demoList(keyword, count))
}, },
}, },
] as MockMethod[] ] as MockMethod[]
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { resultError, resultPageSuccess, resultSuccess } from '../_util' import { Response } from '../_util'
const accountList = (() => { const accountList = (() => {
const result: any[] = [] const result: any[] = []
...@@ -135,18 +135,22 @@ export default [ ...@@ -135,18 +135,22 @@ export default [
url: '/basic-api/system/getAccountList', url: '/basic-api/system/getAccountList',
timeout: 100, timeout: 100,
method: 'get', method: 'get',
response: ({ query }) => { response: () => {
const { page = 1, pageSize = 20 } = query return Response.ok({
return resultPageSuccess(page, pageSize, accountList) data: accountList,
total: accountList.length,
})
}, },
}, },
{ {
url: '/basic-api/system/getRoleListByPage', url: '/basic-api/system/getRoleListByPage',
timeout: 100, timeout: 100,
method: 'get', method: 'get',
response: ({ query }) => { response: () => {
const { page = 1, pageSize = 20 } = query return Response.ok({
return resultPageSuccess(page, pageSize, roleList) data: roleList,
total: roleList.length,
})
}, },
}, },
{ {
...@@ -155,7 +159,7 @@ export default [ ...@@ -155,7 +159,7 @@ export default [
method: 'post', method: 'post',
response: ({ query }) => { response: ({ query }) => {
const { id, status } = query const { id, status } = query
return resultSuccess({ id, status }) return Response.ok({ id, status })
}, },
}, },
{ {
...@@ -163,7 +167,7 @@ export default [ ...@@ -163,7 +167,7 @@ export default [
timeout: 100, timeout: 100,
method: 'get', method: 'get',
response: () => { response: () => {
return resultSuccess(roleList) return Response.ok(roleList)
}, },
}, },
{ {
...@@ -171,7 +175,7 @@ export default [ ...@@ -171,7 +175,7 @@ export default [
timeout: 100, timeout: 100,
method: 'get', method: 'get',
response: () => { response: () => {
return resultSuccess(deptList) return Response.ok(deptList)
}, },
}, },
{ {
...@@ -179,7 +183,7 @@ export default [ ...@@ -179,7 +183,7 @@ export default [
timeout: 100, timeout: 100,
method: 'get', method: 'get',
response: () => { response: () => {
return resultSuccess(menuList) return Response.ok(menuList)
}, },
}, },
{ {
...@@ -189,9 +193,9 @@ export default [ ...@@ -189,9 +193,9 @@ export default [
response: ({ body }) => { response: ({ body }) => {
const { account } = body || {} const { account } = body || {}
if (account && account.indexOf('admin') !== -1) { if (account && account.indexOf('admin') !== -1) {
return resultError('该字段不能包含admin') return Response.no('该字段不能包含admin')
} else { } else {
return resultSuccess(`${account} can use`) return Response.ok(`${account} can use`)
} }
}, },
}, },
......
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { Random } from 'mockjs' import { Random } from 'mockjs'
import { resultPageSuccess } from '../_util' import { Response } from '../_util'
function getRandomPics(count = 10): string[] { function getRandomPics(count = 10): string[] {
const arr: string[] = [] const arr: string[] = []
...@@ -44,9 +44,11 @@ export default [ ...@@ -44,9 +44,11 @@ export default [
url: '/basic-api/table/getDemoList', url: '/basic-api/table/getDemoList',
timeout: 100, timeout: 100,
method: 'get', method: 'get',
response: ({ query }) => { response: () => {
const { page = 1, pageSize = 20 } = query return Response.ok({
return resultPageSuccess(page, pageSize, demoList) data: demoList,
total: demoList.length,
})
}, },
}, },
] as MockMethod[] ] as MockMethod[]
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { resultSuccess } from '../_util' import { Response } from '../_util'
const demoTreeList = (keyword) => { const demoTreeList = (keyword) => {
const result = { const result = {
...@@ -32,7 +32,7 @@ export default [ ...@@ -32,7 +32,7 @@ export default [
response: ({ query }) => { response: ({ query }) => {
const { keyword } = query const { keyword } = query
console.log(keyword) console.log(keyword)
return resultSuccess(demoTreeList(keyword)) return Response.ok(demoTreeList(keyword))
}, },
}, },
] as MockMethod[] ] as MockMethod[]
import { resultSuccess, resultError, getRequestToken, requestParams } from '../_util'
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { createFakeUserList } from './user' import { createFakeUserList } from './user'
import { Response, Request } from '../_util'
// single // single
const dashboardRoute = { const dashboardRoute = {
...@@ -228,14 +228,14 @@ export default [ ...@@ -228,14 +228,14 @@ export default [
url: '/basic-api/getMenuList', url: '/basic-api/getMenuList',
timeout: 1000, timeout: 1000,
method: 'get', method: 'get',
response: (request: requestParams) => { response: (request: Request) => {
const token = getRequestToken(request) const token = Request.getRequestToken(request)
if (!token) { if (!token) {
return resultError('Invalid token!') return Response.no('Invalid token!')
} }
const checkUser = createFakeUserList().find((item) => item.token === token) const checkUser = createFakeUserList().find((item) => item.token === token)
if (!checkUser) { if (!checkUser) {
return resultError('Invalid user token!') return Response.no('Invalid user token!')
} }
const id = checkUser.userId const id = checkUser.userId
let menu: Object[] let menu: Object[]
...@@ -252,7 +252,7 @@ export default [ ...@@ -252,7 +252,7 @@ export default [
menu = [] menu = []
} }
return resultSuccess(menu) return Response.ok(menu)
}, },
}, },
] as MockMethod[] ] as MockMethod[]
import { MockMethod } from 'vite-plugin-mock' import { MockMethod } from 'vite-plugin-mock'
import { resultError, resultSuccess, getRequestToken, requestParams } from '../_util' import { Response, Request } from '../_util'
export function createFakeUserList() { export function createFakeUserList() {
return [ return [
{ {
userId: '1', userId: '1',
username: 'vben', username: 'basic',
realName: 'Vben Admin', realName: 'Basic Admin',
avatar: 'https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640', avatar: 'https://q1.qlogo.cn/g?b=qq&nk=190848757&s=640',
desc: 'manager', desc: 'manager',
password: '123456', password: '123456',
...@@ -55,10 +55,10 @@ export default [ ...@@ -55,10 +55,10 @@ export default [
(item) => item.username === username && password === item.password, (item) => item.username === username && password === item.password,
) )
if (!checkUser) { if (!checkUser) {
return resultError('Incorrect account or password!') return Response.no('Incorrect account or password!')
} }
const { userId, username: _username, token, realName, desc, roles } = checkUser const { userId, username: _username, token, realName, desc, roles } = checkUser
return resultSuccess({ return Response.ok({
roles, roles,
userId, userId,
username: _username, username: _username,
...@@ -71,44 +71,44 @@ export default [ ...@@ -71,44 +71,44 @@ export default [
{ {
url: '/basic-api/getUserInfo', url: '/basic-api/getUserInfo',
method: 'get', method: 'get',
response: (request: requestParams) => { response: (request: Request) => {
const token = getRequestToken(request) const token = Request.getRequestToken(request)
if (!token) return resultError('Invalid token') if (!token) return Response.no('Invalid token')
const checkUser = createFakeUserList().find((item) => item.token === token) const checkUser = createFakeUserList().find((item) => item.token === token)
if (!checkUser) { if (!checkUser) {
return resultError('The corresponding user information was not obtained!') return Response.no('The corresponding user information was not obtained!')
} }
return resultSuccess(checkUser) return Response.ok(checkUser)
}, },
}, },
{ {
url: '/basic-api/getPermCode', url: '/basic-api/getPermCode',
timeout: 200, timeout: 200,
method: 'get', method: 'get',
response: (request: requestParams) => { response: (request: Request) => {
const token = getRequestToken(request) const token = Request.getRequestToken(request)
if (!token) return resultError('Invalid token') if (!token) return Response.no('Invalid token')
const checkUser = createFakeUserList().find((item) => item.token === token) const checkUser = createFakeUserList().find((item) => item.token === token)
if (!checkUser) { if (!checkUser) {
return resultError('Invalid token!') return Response.no('Invalid token!')
} }
const codeList = fakeCodeList[checkUser.userId] const codeList = fakeCodeList[checkUser.userId]
return resultSuccess(codeList) return Response.ok(codeList)
}, },
}, },
{ {
url: '/basic-api/logout', url: '/basic-api/logout',
timeout: 200, timeout: 200,
method: 'get', method: 'get',
response: (request: requestParams) => { response: (request: Request) => {
const token = getRequestToken(request) const token = Request.getRequestToken(request)
if (!token) return resultError('Invalid token') if (!token) return Response.no('Invalid token')
const checkUser = createFakeUserList().find((item) => item.token === token) const checkUser = createFakeUserList().find((item) => item.token === token)
if (!checkUser) { if (!checkUser) {
return resultError('Invalid token!') return Response.no('Invalid token!')
} }
return resultSuccess(undefined, { message: 'Token has been destroyed' }) return Response.ok(undefined, { message: 'Token has been destroyed' })
}, },
}, },
{ {
...@@ -116,7 +116,7 @@ export default [ ...@@ -116,7 +116,7 @@ export default [
statusCode: 405, statusCode: 405,
method: 'get', method: 'get',
response: () => { response: () => {
return resultError('Error!') return Response.no('Error!')
}, },
}, },
] as MockMethod[] ] as MockMethod[]
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
"stylelint-order": "^5.0.0", "stylelint-order": "^5.0.0",
"ts-node": "^10.7.0", "ts-node": "^10.7.0",
"typescript": "^4.6.2", "typescript": "^4.6.2",
"unplugin-auto-import": "^0.6.6",
"vite": "^2.9.0-beta.3", "vite": "^2.9.0-beta.3",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.0",
......
...@@ -90,6 +90,7 @@ specifiers: ...@@ -90,6 +90,7 @@ specifiers:
tinymce: ^5.10.3 tinymce: ^5.10.3
ts-node: ^10.7.0 ts-node: ^10.7.0
typescript: ^4.6.2 typescript: ^4.6.2
unplugin-auto-import: ^0.6.6
vditor: ^3.8.12 vditor: ^3.8.12
vite: ^2.9.0-beta.3 vite: ^2.9.0-beta.3
vite-plugin-compression: ^0.5.1 vite-plugin-compression: ^0.5.1
...@@ -214,6 +215,7 @@ devDependencies: ...@@ -214,6 +215,7 @@ devDependencies:
stylelint-order: 5.0.0_stylelint@14.6.0 stylelint-order: 5.0.0_stylelint@14.6.0
ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645 ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645
typescript: 4.6.2 typescript: 4.6.2
unplugin-auto-import: registry.npmjs.org/unplugin-auto-import/0.6.6_7a5c7251945451c56f2f00d532b9cf8f
vite: 2.9.0-beta.3_less@4.1.2 vite: 2.9.0-beta.3_less@4.1.2
vite-plugin-compression: 0.5.1_vite@2.9.0-beta.3 vite-plugin-compression: 0.5.1_vite@2.9.0-beta.3
vite-plugin-html: 3.2.0_vite@2.9.0-beta.3 vite-plugin-html: 3.2.0_vite@2.9.0-beta.3
...@@ -261,10 +263,6 @@ packages: ...@@ -261,10 +263,6 @@ packages:
vue: 3.2.31 vue: 3.2.31
dev: false dev: false
/@antfu/utils/0.5.0:
resolution: {integrity: sha512-MrAQ/MrPSxbh1bBrmwJjORfJymw4IqSHFBXqvxaga3ZdDM+/zokYF8DjyJpSjY2QmpmgQrajDUBJOWrYeARfzA==}
dev: true
/@apideck/better-ajv-errors/0.3.3_ajv@8.10.0: /@apideck/better-ajv-errors/0.3.3_ajv@8.10.0:
resolution: {integrity: sha512-9o+HO2MbJhJHjDYZaDxJmSDckvDpiuItEsrIShV0DXeCshXWRHhqYyU/PKHMkuClOmFnZhRd6wzv4vpDu/dRKg==} resolution: {integrity: sha512-9o+HO2MbJhJHjDYZaDxJmSDckvDpiuItEsrIShV0DXeCshXWRHhqYyU/PKHMkuClOmFnZhRd6wzv4vpDu/dRKg==}
engines: {node: '>=10'} engines: {node: '>=10'}
...@@ -390,7 +388,7 @@ packages: ...@@ -390,7 +388,7 @@ packages:
'@babel/traverse': 7.17.3 '@babel/traverse': 7.17.3
debug: registry.npmjs.org/debug/4.3.4 debug: registry.npmjs.org/debug/4.3.4
lodash.debounce: 4.0.8 lodash.debounce: 4.0.8
resolve: 1.22.0 resolve: registry.npmjs.org/resolve/1.22.0
semver: 6.3.0 semver: 6.3.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
...@@ -1929,7 +1927,7 @@ packages: ...@@ -1929,7 +1927,7 @@ packages:
dependencies: dependencies:
'@babel/core': 7.17.7 '@babel/core': 7.17.7
'@babel/helper-module-imports': 7.16.7 '@babel/helper-module-imports': 7.16.7
'@rollup/pluginutils': 3.1.0_rollup@2.70.1 '@rollup/pluginutils': registry.npmjs.org/@rollup/pluginutils/3.1.0_rollup@2.70.1
rollup: 2.70.1 rollup: 2.70.1
dev: true dev: true
...@@ -1939,12 +1937,12 @@ packages: ...@@ -1939,12 +1937,12 @@ packages:
peerDependencies: peerDependencies:
rollup: ^1.20.0||^2.0.0 rollup: ^1.20.0||^2.0.0
dependencies: dependencies:
'@rollup/pluginutils': 3.1.0_rollup@2.70.1 '@rollup/pluginutils': registry.npmjs.org/@rollup/pluginutils/3.1.0_rollup@2.70.1
'@types/resolve': 1.17.1 '@types/resolve': 1.17.1
builtin-modules: 3.2.0 builtin-modules: 3.2.0
deepmerge: 4.2.2 deepmerge: 4.2.2
is-module: 1.0.0 is-module: 1.0.0
resolve: 1.22.0 resolve: registry.npmjs.org/resolve/1.22.0
rollup: 2.70.1 rollup: 2.70.1
dev: true dev: true
...@@ -1954,12 +1952,12 @@ packages: ...@@ -1954,12 +1952,12 @@ packages:
peerDependencies: peerDependencies:
rollup: ^2.42.0 rollup: ^2.42.0
dependencies: dependencies:
'@rollup/pluginutils': 3.1.0_rollup@2.70.1 '@rollup/pluginutils': registry.npmjs.org/@rollup/pluginutils/3.1.0_rollup@2.70.1
'@types/resolve': 1.17.1 '@types/resolve': 1.17.1
builtin-modules: 3.2.0 builtin-modules: 3.2.0
deepmerge: 4.2.2 deepmerge: 4.2.2
is-module: 1.0.0 is-module: 1.0.0
resolve: 1.22.0 resolve: registry.npmjs.org/resolve/1.22.0
rollup: 2.70.1 rollup: 2.70.1
dev: true dev: true
...@@ -1968,20 +1966,8 @@ packages: ...@@ -1968,20 +1966,8 @@ packages:
peerDependencies: peerDependencies:
rollup: ^1.20.0 || ^2.0.0 rollup: ^1.20.0 || ^2.0.0
dependencies: dependencies:
'@rollup/pluginutils': 3.1.0_rollup@2.70.1 '@rollup/pluginutils': registry.npmjs.org/@rollup/pluginutils/3.1.0_rollup@2.70.1
magic-string: 0.25.9 magic-string: registry.npmjs.org/magic-string/0.25.9
rollup: 2.70.1
dev: true
/@rollup/pluginutils/3.1.0_rollup@2.70.1:
resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
engines: {node: '>= 8.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0
dependencies:
'@types/estree': 0.0.39
estree-walker: 1.0.1
picomatch: 2.3.1
rollup: 2.70.1 rollup: 2.70.1
dev: true dev: true
...@@ -2005,7 +1991,7 @@ packages: ...@@ -2005,7 +1991,7 @@ packages:
dependencies: dependencies:
ejs: 3.1.6 ejs: 3.1.6
json5: 2.2.0 json5: 2.2.0
magic-string: 0.25.9 magic-string: registry.npmjs.org/magic-string/0.25.9
string.prototype.matchall: 4.0.6 string.prototype.matchall: 4.0.6
dev: true dev: true
...@@ -2611,11 +2597,11 @@ packages: ...@@ -2611,11 +2597,11 @@ packages:
/@windicss/plugin-utils/1.8.3: /@windicss/plugin-utils/1.8.3:
resolution: {integrity: sha512-emlMeDt73uNV1ZofLTDogcxqL9aZ5uIRYkjeHlrWiaDozFbX6Jc+a6eRo9Ieaar3JUryl6AnecTPHAiFDl4IXg==} resolution: {integrity: sha512-emlMeDt73uNV1ZofLTDogcxqL9aZ5uIRYkjeHlrWiaDozFbX6Jc+a6eRo9Ieaar3JUryl6AnecTPHAiFDl4IXg==}
dependencies: dependencies:
'@antfu/utils': 0.5.0 '@antfu/utils': registry.npmjs.org/@antfu/utils/0.5.0
'@windicss/config': 1.8.3 '@windicss/config': 1.8.3
debug: registry.npmjs.org/debug/4.3.4 debug: registry.npmjs.org/debug/4.3.4
fast-glob: 3.2.11 fast-glob: 3.2.11
magic-string: 0.25.9 magic-string: registry.npmjs.org/magic-string/0.25.9
micromatch: 4.0.4 micromatch: 4.0.4
windicss: 3.5.1 windicss: 3.5.1
transitivePeerDependencies: transitivePeerDependencies:
...@@ -2755,8 +2741,8 @@ packages: ...@@ -2755,8 +2741,8 @@ packages:
resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==}
engines: {node: '>= 8'} engines: {node: '>= 8'}
dependencies: dependencies:
normalize-path: 3.0.0 normalize-path: registry.npmjs.org/normalize-path/3.0.0
picomatch: 2.3.1 picomatch: registry.npmjs.org/picomatch/2.3.1
dev: true dev: true
/arg/4.1.3: /arg/4.1.3:
...@@ -2965,11 +2951,6 @@ packages: ...@@ -2965,11 +2951,6 @@ packages:
tempfile: 2.0.0 tempfile: 2.0.0
dev: true dev: true
/binary-extensions/2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
engines: {node: '>=8'}
dev: true
/bl/1.2.3: /bl/1.2.3:
resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==}
dependencies: dependencies:
...@@ -3004,7 +2985,7 @@ packages: ...@@ -3004,7 +2985,7 @@ packages:
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
engines: {node: '>=8'} engines: {node: '>=8'}
dependencies: dependencies:
fill-range: 7.0.1 fill-range: registry.npmjs.org/fill-range/7.0.1
dev: true dev: true
/browserslist/4.20.2: /browserslist/4.20.2:
...@@ -3083,7 +3064,7 @@ packages: ...@@ -3083,7 +3064,7 @@ packages:
/call-bind/1.0.2: /call-bind/1.0.2:
resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==}
dependencies: dependencies:
function-bind: 1.1.1 function-bind: registry.npmjs.org/function-bind/1.1.1
get-intrinsic: 1.1.1 get-intrinsic: 1.1.1
/callsites/3.1.0: /callsites/3.1.0:
...@@ -4214,10 +4195,10 @@ packages: ...@@ -4214,10 +4195,10 @@ packages:
dependencies: dependencies:
call-bind: 1.0.2 call-bind: 1.0.2
es-to-primitive: 1.2.1 es-to-primitive: 1.2.1
function-bind: 1.1.1 function-bind: registry.npmjs.org/function-bind/1.1.1
get-intrinsic: 1.1.1 get-intrinsic: 1.1.1
get-symbol-description: 1.0.0 get-symbol-description: 1.0.0
has: 1.0.3 has: registry.npmjs.org/has/1.0.3
has-symbols: 1.0.3 has-symbols: 1.0.3
internal-slot: 1.0.3 internal-slot: 1.0.3
is-callable: 1.2.4 is-callable: 1.2.4
...@@ -4489,10 +4470,6 @@ packages: ...@@ -4489,10 +4470,6 @@ packages:
engines: {node: '>=4.0'} engines: {node: '>=4.0'}
dev: true dev: true
/estree-walker/1.0.1:
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
dev: true
/estree-walker/2.0.2: /estree-walker/2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
...@@ -4774,13 +4751,6 @@ packages: ...@@ -4774,13 +4751,6 @@ packages:
trim-repeated: 1.0.0 trim-repeated: 1.0.0
dev: true dev: true
/fill-range/7.0.1:
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
engines: {node: '>=8'}
dependencies:
to-regex-range: 5.0.1
dev: true
/finalhandler/1.1.2: /finalhandler/1.1.2:
resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==}
engines: {node: '>= 0.8'} engines: {node: '>= 0.8'}
...@@ -4840,7 +4810,7 @@ packages: ...@@ -4840,7 +4810,7 @@ packages:
engines: {node: '>= 8'} engines: {node: '>= 8'}
dependencies: dependencies:
detect-file: 1.0.0 detect-file: 1.0.0
is-glob: 4.0.3 is-glob: registry.npmjs.org/is-glob/4.0.3
micromatch: 4.0.4 micromatch: 4.0.4
resolve-dir: 1.0.1 resolve-dir: 1.0.1
dev: true dev: true
...@@ -4925,9 +4895,6 @@ packages: ...@@ -4925,9 +4895,6 @@ packages:
resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=}
dev: true dev: true
/function-bind/1.1.1:
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
/functional-red-black-tree/1.0.1: /functional-red-black-tree/1.0.1:
resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=} resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=}
dev: true dev: true
...@@ -4944,8 +4911,8 @@ packages: ...@@ -4944,8 +4911,8 @@ packages:
/get-intrinsic/1.1.1: /get-intrinsic/1.1.1:
resolution: {integrity: sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==} resolution: {integrity: sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==}
dependencies: dependencies:
function-bind: 1.1.1 function-bind: registry.npmjs.org/function-bind/1.1.1
has: 1.0.3 has: registry.npmjs.org/has/1.0.3
has-symbols: 1.0.3 has-symbols: 1.0.3
/get-own-enumerable-property-symbols/3.0.2: /get-own-enumerable-property-symbols/3.0.2:
...@@ -5269,12 +5236,6 @@ packages: ...@@ -5269,12 +5236,6 @@ packages:
kind-of: 4.0.0 kind-of: 4.0.0
dev: true dev: true
/has/1.0.3:
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
engines: {node: '>= 0.4.0'}
dependencies:
function-bind: 1.1.1
/hash-sum/2.0.0: /hash-sum/2.0.0:
resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==} resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==}
dev: true dev: true
...@@ -5559,7 +5520,7 @@ packages: ...@@ -5559,7 +5520,7 @@ packages:
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
dependencies: dependencies:
get-intrinsic: 1.1.1 get-intrinsic: 1.1.1
has: 1.0.3 has: registry.npmjs.org/has/1.0.3
side-channel: 1.0.4 side-channel: 1.0.4
dev: true dev: true
...@@ -5595,7 +5556,7 @@ packages: ...@@ -5595,7 +5556,7 @@ packages:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
engines: {node: '>=8'} engines: {node: '>=8'}
dependencies: dependencies:
binary-extensions: 2.2.0 binary-extensions: registry.npmjs.org/binary-extensions/2.2.0
dev: true dev: true
/is-boolean-object/1.1.2: /is-boolean-object/1.1.2:
...@@ -5615,12 +5576,6 @@ packages: ...@@ -5615,12 +5576,6 @@ packages:
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
dev: true dev: true
/is-core-module/2.8.1:
resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==}
dependencies:
has: 1.0.3
dev: true
/is-cwebp-readable/3.0.0: /is-cwebp-readable/3.0.0:
resolution: {integrity: sha512-bpELc7/Q1/U5MWHn4NdHI44R3jxk0h9ew9ljzabiRl70/UIjL/ZAqRMb52F5+eke/VC8yTiv4Ewryo1fPWidvA==} resolution: {integrity: sha512-bpELc7/Q1/U5MWHn4NdHI44R3jxk0h9ew9ljzabiRl70/UIjL/ZAqRMb52F5+eke/VC8yTiv4Ewryo1fPWidvA==}
dependencies: dependencies:
...@@ -6477,7 +6432,7 @@ packages: ...@@ -6477,7 +6432,7 @@ packages:
engines: {node: '>=8.6'} engines: {node: '>=8.6'}
dependencies: dependencies:
braces: 3.0.2 braces: 3.0.2
picomatch: 2.3.1 picomatch: registry.npmjs.org/picomatch/2.3.1
dev: true dev: true
/mime-db/1.52.0: /mime-db/1.52.0:
...@@ -6636,7 +6591,7 @@ packages: ...@@ -6636,7 +6591,7 @@ packages:
resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
dependencies: dependencies:
hosted-git-info: 2.8.9 hosted-git-info: 2.8.9
resolve: 1.22.0 resolve: registry.npmjs.org/resolve/1.22.0
semver: 5.7.1 semver: 5.7.1
validate-npm-package-license: 3.0.4 validate-npm-package-license: 3.0.4
dev: true dev: true
...@@ -6646,7 +6601,7 @@ packages: ...@@ -6646,7 +6601,7 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dependencies: dependencies:
hosted-git-info: 4.1.0 hosted-git-info: 4.1.0
is-core-module: 2.8.1 is-core-module: registry.npmjs.org/is-core-module/2.8.1
semver: 7.3.5 semver: 7.3.5
validate-npm-package-license: 3.0.4 validate-npm-package-license: 3.0.4
dev: true dev: true
...@@ -7026,10 +6981,6 @@ packages: ...@@ -7026,10 +6981,6 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dev: true dev: true
/path-parse/1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
dev: true
/path-to-regexp/6.2.0: /path-to-regexp/6.2.0:
resolution: {integrity: sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==} resolution: {integrity: sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==}
...@@ -7476,7 +7427,7 @@ packages: ...@@ -7476,7 +7427,7 @@ packages:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
engines: {node: '>=8.10.0'} engines: {node: '>=8.10.0'}
dependencies: dependencies:
picomatch: 2.3.1 picomatch: registry.npmjs.org/picomatch/2.3.1
dev: true dev: true
/redent/1.0.0: /redent/1.0.0:
...@@ -7637,9 +7588,9 @@ packages: ...@@ -7637,9 +7588,9 @@ packages:
resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==}
hasBin: true hasBin: true
dependencies: dependencies:
is-core-module: 2.8.1 is-core-module: registry.npmjs.org/is-core-module/2.8.1
path-parse: 1.0.7 path-parse: registry.npmjs.org/path-parse/1.0.7
supports-preserve-symlinks-flag: 1.0.0 supports-preserve-symlinks-flag: registry.npmjs.org/supports-preserve-symlinks-flag/1.0.0
dev: true dev: true
/restore-cursor/2.0.0: /restore-cursor/2.0.0:
...@@ -8416,11 +8367,6 @@ packages: ...@@ -8416,11 +8367,6 @@ packages:
supports-color: 7.2.0 supports-color: 7.2.0
dev: true dev: true
/supports-preserve-symlinks-flag/1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
dev: true
/svg-baker/1.7.0: /svg-baker/1.7.0:
resolution: {integrity: sha512-nibslMbkXOIkqKVrfcncwha45f97fGuAOn1G99YwnwTj8kF9YiM6XexPcUso97NxOm6GsP0SIvYVIosBis1xLg==} resolution: {integrity: sha512-nibslMbkXOIkqKVrfcncwha45f97fGuAOn1G99YwnwTj8kF9YiM6XexPcUso97NxOm6GsP0SIvYVIosBis1xLg==}
dependencies: dependencies:
...@@ -8594,13 +8540,6 @@ packages: ...@@ -8594,13 +8540,6 @@ packages:
kind-of: 3.2.2 kind-of: 3.2.2
dev: true dev: true
/to-regex-range/5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
dependencies:
is-number: registry.npmjs.org/is-number/7.0.0
dev: true
/to-regex/3.0.2: /to-regex/3.0.2:
resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
...@@ -8746,7 +8685,7 @@ packages: ...@@ -8746,7 +8685,7 @@ packages:
/unbox-primitive/1.0.1: /unbox-primitive/1.0.1:
resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==} resolution: {integrity: sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==}
dependencies: dependencies:
function-bind: 1.1.1 function-bind: registry.npmjs.org/function-bind/1.1.1
has-bigints: 1.0.1 has-bigints: 1.0.1
has-symbols: 1.0.3 has-symbols: 1.0.3
which-boxed-primitive: 1.0.2 which-boxed-primitive: 1.0.2
...@@ -9690,6 +9629,12 @@ packages: ...@@ -9690,6 +9629,12 @@ packages:
tslib: 2.3.0 tslib: 2.3.0
dev: false dev: false
registry.npmjs.org/@antfu/utils/0.5.0:
resolution: {integrity: sha512-MrAQ/MrPSxbh1bBrmwJjORfJymw4IqSHFBXqvxaga3ZdDM+/zokYF8DjyJpSjY2QmpmgQrajDUBJOWrYeARfzA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@antfu/utils/-/utils-0.5.0.tgz}
name: '@antfu/utils'
version: 0.5.0
dev: true
registry.npmjs.org/@babel/code-frame/7.16.7: registry.npmjs.org/@babel/code-frame/7.16.7:
resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz} resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz}
name: '@babel/code-frame' name: '@babel/code-frame'
...@@ -9833,6 +9778,31 @@ packages: ...@@ -9833,6 +9778,31 @@ packages:
fastq: registry.npmjs.org/fastq/1.13.0 fastq: registry.npmjs.org/fastq/1.13.0
dev: true dev: true
registry.npmjs.org/@rollup/pluginutils/3.1.0_rollup@2.70.1:
resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz}
id: registry.npmjs.org/@rollup/pluginutils/3.1.0
name: '@rollup/pluginutils'
version: 3.1.0
engines: {node: '>= 8.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0
dependencies:
'@types/estree': 0.0.39
estree-walker: registry.npmjs.org/estree-walker/1.0.1
picomatch: registry.npmjs.org/picomatch/2.3.1
rollup: 2.70.1
dev: true
registry.npmjs.org/@rollup/pluginutils/4.2.0:
resolution: {integrity: sha512-2WUyJNRkyH5p487pGnn4tWAsxhEFKN/pT8CMgHshd5H+IXkOnKvKZwsz5ZWz+YCXkleZRAU5kwbfgF8CPfDRqA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.0.tgz}
name: '@rollup/pluginutils'
version: 4.2.0
engines: {node: '>= 8.0.0'}
dependencies:
estree-walker: registry.npmjs.org/estree-walker/2.0.2
picomatch: registry.npmjs.org/picomatch/2.3.1
dev: true
registry.npmjs.org/@sindresorhus/is/0.7.0: registry.npmjs.org/@sindresorhus/is/0.7.0:
resolution: {integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz} resolution: {integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz}
name: '@sindresorhus/is' name: '@sindresorhus/is'
...@@ -10026,6 +9996,16 @@ packages: ...@@ -10026,6 +9996,16 @@ packages:
engines: {node: '>=12'} engines: {node: '>=12'}
dev: true dev: true
registry.npmjs.org/anymatch/3.1.2:
resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz}
name: anymatch
version: 3.1.2
engines: {node: '>= 8'}
dependencies:
normalize-path: registry.npmjs.org/normalize-path/3.0.0
picomatch: registry.npmjs.org/picomatch/2.3.1
dev: true
registry.npmjs.org/arch/2.2.0: registry.npmjs.org/arch/2.2.0:
resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/arch/-/arch-2.2.0.tgz} resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/arch/-/arch-2.2.0.tgz}
name: arch name: arch
...@@ -10112,6 +10092,13 @@ packages: ...@@ -10112,6 +10092,13 @@ packages:
pify: registry.npmjs.org/pify/4.0.1 pify: registry.npmjs.org/pify/4.0.1
dev: true dev: true
registry.npmjs.org/binary-extensions/2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz}
name: binary-extensions
version: 2.2.0
engines: {node: '>=8'}
dev: true
registry.npmjs.org/bl/1.2.3: registry.npmjs.org/bl/1.2.3:
resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/bl/-/bl-1.2.3.tgz} resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/bl/-/bl-1.2.3.tgz}
name: bl name: bl
...@@ -10280,6 +10267,23 @@ packages: ...@@ -10280,6 +10267,23 @@ packages:
version: 0.7.0 version: 0.7.0
dev: true dev: true
registry.npmjs.org/chokidar/3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz}
name: chokidar
version: 3.5.3
engines: {node: '>= 8.10.0'}
dependencies:
anymatch: registry.npmjs.org/anymatch/3.1.2
braces: registry.npmjs.org/braces/3.0.2
glob-parent: registry.npmjs.org/glob-parent/5.1.2
is-binary-path: registry.npmjs.org/is-binary-path/2.1.0
is-glob: registry.npmjs.org/is-glob/4.0.3
normalize-path: registry.npmjs.org/normalize-path/3.0.0
readdirp: registry.npmjs.org/readdirp/3.6.0
optionalDependencies:
fsevents: registry.npmjs.org/fsevents/2.3.2
dev: true
registry.npmjs.org/cli-cursor/2.1.0: registry.npmjs.org/cli-cursor/2.1.0:
resolution: {integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz} resolution: {integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz}
name: cli-cursor name: cli-cursor
...@@ -10955,6 +10959,18 @@ packages: ...@@ -10955,6 +10959,18 @@ packages:
engines: {node: '>=0.8.0'} engines: {node: '>=0.8.0'}
dev: true dev: true
registry.npmjs.org/estree-walker/1.0.1:
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz}
name: estree-walker
version: 1.0.1
dev: true
registry.npmjs.org/estree-walker/2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz}
name: estree-walker
version: 2.0.2
dev: true
registry.npmjs.org/execa/0.7.0: registry.npmjs.org/execa/0.7.0:
resolution: {integrity: sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/execa/-/execa-0.7.0.tgz} resolution: {integrity: sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/execa/-/execa-0.7.0.tgz}
name: execa name: execa
...@@ -11279,6 +11295,11 @@ packages: ...@@ -11279,6 +11295,11 @@ packages:
dev: true dev: true
optional: true optional: true
registry.npmjs.org/function-bind/1.1.1:
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz}
name: function-bind
version: 1.1.1
registry.npmjs.org/get-proxy/2.1.0: registry.npmjs.org/get-proxy/2.1.0:
resolution: {integrity: sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz} resolution: {integrity: sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz}
name: get-proxy name: get-proxy
...@@ -11487,6 +11508,14 @@ packages: ...@@ -11487,6 +11508,14 @@ packages:
has-symbol-support-x: registry.npmjs.org/has-symbol-support-x/1.4.2 has-symbol-support-x: registry.npmjs.org/has-symbol-support-x/1.4.2
dev: true dev: true
registry.npmjs.org/has/1.0.3:
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/has/-/has-1.0.3.tgz}
name: has
version: 1.0.3
engines: {node: '>= 0.4.0'}
dependencies:
function-bind: registry.npmjs.org/function-bind/1.1.1
registry.npmjs.org/homedir-polyfill/1.0.3: registry.npmjs.org/homedir-polyfill/1.0.3:
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz} resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz}
name: homedir-polyfill name: homedir-polyfill
...@@ -11631,6 +11660,23 @@ packages: ...@@ -11631,6 +11660,23 @@ packages:
version: 0.2.1 version: 0.2.1
dev: true dev: true
registry.npmjs.org/is-binary-path/2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz}
name: is-binary-path
version: 2.1.0
engines: {node: '>=8'}
dependencies:
binary-extensions: registry.npmjs.org/binary-extensions/2.2.0
dev: true
registry.npmjs.org/is-core-module/2.8.1:
resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz}
name: is-core-module
version: 2.8.1
dependencies:
has: registry.npmjs.org/has/1.0.3
dev: true
registry.npmjs.org/is-extglob/2.1.1: registry.npmjs.org/is-extglob/2.1.1:
resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz} resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz}
name: is-extglob name: is-extglob
...@@ -11811,6 +11857,13 @@ packages: ...@@ -11811,6 +11857,13 @@ packages:
dev: true dev: true
optional: true optional: true
registry.npmjs.org/local-pkg/0.4.1:
resolution: {integrity: sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.1.tgz}
name: local-pkg
version: 0.4.1
engines: {node: '>=14'}
dev: true
registry.npmjs.org/lodash.map/4.6.0: registry.npmjs.org/lodash.map/4.6.0:
resolution: {integrity: sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz} resolution: {integrity: sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz}
name: lodash.map name: lodash.map
...@@ -11860,6 +11913,23 @@ packages: ...@@ -11860,6 +11913,23 @@ packages:
yallist: registry.npmjs.org/yallist/2.1.2 yallist: registry.npmjs.org/yallist/2.1.2
dev: true dev: true
registry.npmjs.org/magic-string/0.25.9:
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz}
name: magic-string
version: 0.25.9
dependencies:
sourcemap-codec: registry.npmjs.org/sourcemap-codec/1.4.8
dev: true
registry.npmjs.org/magic-string/0.26.1:
resolution: {integrity: sha512-ndThHmvgtieXe8J/VGPjG+Apu7v7ItcD5mhEIvOscWjPF/ccOiLxHaSuCAS2G+3x4GKsAbT8u7zdyamupui8Tg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/magic-string/-/magic-string-0.26.1.tgz}
name: magic-string
version: 0.26.1
engines: {node: '>=12'}
dependencies:
sourcemap-codec: registry.npmjs.org/sourcemap-codec/1.4.8
dev: true
registry.npmjs.org/make-dir/1.3.0: registry.npmjs.org/make-dir/1.3.0:
resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz} resolution: {integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz}
name: make-dir name: make-dir
...@@ -12028,6 +12098,13 @@ packages: ...@@ -12028,6 +12098,13 @@ packages:
whatwg-url: registry.npmjs.org/whatwg-url/5.0.0 whatwg-url: registry.npmjs.org/whatwg-url/5.0.0
dev: true dev: true
registry.npmjs.org/normalize-path/3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz}
name: normalize-path
version: 3.0.0
engines: {node: '>=0.10.0'}
dev: true
registry.npmjs.org/normalize-url/2.0.1: registry.npmjs.org/normalize-url/2.0.1:
resolution: {integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz} resolution: {integrity: sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz}
name: normalize-url name: normalize-url
...@@ -12199,6 +12276,12 @@ packages: ...@@ -12199,6 +12276,12 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
dev: true dev: true
registry.npmjs.org/path-parse/1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz}
name: path-parse
version: 1.0.7
dev: true
registry.npmjs.org/path-type/1.1.0: registry.npmjs.org/path-type/1.1.0:
resolution: {integrity: sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz} resolution: {integrity: sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz}
name: path-type name: path-type
...@@ -12367,6 +12450,15 @@ packages: ...@@ -12367,6 +12450,15 @@ packages:
util-deprecate: registry.npmjs.org/util-deprecate/1.0.2 util-deprecate: registry.npmjs.org/util-deprecate/1.0.2
dev: true dev: true
registry.npmjs.org/readdirp/3.6.0:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz}
name: readdirp
version: 3.6.0
engines: {node: '>=8.10.0'}
dependencies:
picomatch: registry.npmjs.org/picomatch/2.3.1
dev: true
registry.npmjs.org/resolve-dir/1.0.1: registry.npmjs.org/resolve-dir/1.0.1:
resolution: {integrity: sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz} resolution: {integrity: sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz}
name: resolve-dir name: resolve-dir
...@@ -12403,6 +12495,17 @@ packages: ...@@ -12403,6 +12495,17 @@ packages:
dev: true dev: true
optional: true optional: true
registry.npmjs.org/resolve/1.22.0:
resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz}
name: resolve
version: 1.22.0
hasBin: true
dependencies:
is-core-module: registry.npmjs.org/is-core-module/2.8.1
path-parse: registry.npmjs.org/path-parse/1.0.7
supports-preserve-symlinks-flag: registry.npmjs.org/supports-preserve-symlinks-flag/1.0.0
dev: true
registry.npmjs.org/responselike/1.0.2: registry.npmjs.org/responselike/1.0.2:
resolution: {integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz} resolution: {integrity: sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz}
name: responselike name: responselike
...@@ -12608,6 +12711,12 @@ packages: ...@@ -12608,6 +12711,12 @@ packages:
engines: {node: '>= 8'} engines: {node: '>= 8'}
dev: true dev: true
registry.npmjs.org/sourcemap-codec/1.4.8:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz}
name: sourcemap-codec
version: 1.4.8
dev: true
registry.npmjs.org/strict-uri-encode/1.1.0: registry.npmjs.org/strict-uri-encode/1.1.0:
resolution: {integrity: sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz} resolution: {integrity: sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz}
name: strict-uri-encode name: strict-uri-encode
...@@ -12766,6 +12875,13 @@ packages: ...@@ -12766,6 +12875,13 @@ packages:
has-flag: registry.npmjs.org/has-flag/4.0.0 has-flag: registry.npmjs.org/has-flag/4.0.0
dev: true dev: true
registry.npmjs.org/supports-preserve-symlinks-flag/1.0.0:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz}
name: supports-preserve-symlinks-flag
version: 1.0.0
engines: {node: '>= 0.4'}
dev: true
registry.npmjs.org/tar-stream/1.6.2: registry.npmjs.org/tar-stream/1.6.2:
resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz} resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz}
name: tar-stream name: tar-stream
...@@ -12973,6 +13089,58 @@ packages: ...@@ -12973,6 +13089,58 @@ packages:
engines: {node: '>= 10.0.0'} engines: {node: '>= 10.0.0'}
dev: true dev: true
registry.npmjs.org/unplugin-auto-import/0.6.6_7a5c7251945451c56f2f00d532b9cf8f:
resolution: {integrity: sha512-x3YxAI9ePoumXOakuS5YJlFkSyAkl5vJlaFZSJhSp75nH5gg8LpqQ/0Gz1/CG/JRRv+xaE1CZpEV161AqFGjEg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/unplugin-auto-import/-/unplugin-auto-import-0.6.6.tgz}
id: registry.npmjs.org/unplugin-auto-import/0.6.6
name: unplugin-auto-import
version: 0.6.6
engines: {node: '>=14'}
peerDependencies:
'@vueuse/core': '*'
peerDependenciesMeta:
'@vueuse/core':
optional: true
dependencies:
'@antfu/utils': registry.npmjs.org/@antfu/utils/0.5.0
'@rollup/pluginutils': registry.npmjs.org/@rollup/pluginutils/4.2.0
'@vueuse/core': 8.1.1_vue@3.2.31
local-pkg: registry.npmjs.org/local-pkg/0.4.1
magic-string: registry.npmjs.org/magic-string/0.26.1
resolve: registry.npmjs.org/resolve/1.22.0
unplugin: registry.npmjs.org/unplugin/0.4.0_rollup@2.70.1+vite@2.9.0-beta.3
transitivePeerDependencies:
- esbuild
- rollup
- vite
- webpack
dev: true
registry.npmjs.org/unplugin/0.4.0_rollup@2.70.1+vite@2.9.0-beta.3:
resolution: {integrity: sha512-4ScITEmzlz1iZW3tkz+3L1V5k/xMQ6kjgm4lEXKxH0ozd8/OUWfiSA7RMRyrawsvq/t50JIzPpp1UyuSL/AXkA==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/unplugin/-/unplugin-0.4.0.tgz}
id: registry.npmjs.org/unplugin/0.4.0
name: unplugin
version: 0.4.0
peerDependencies:
esbuild: '>=0.13'
rollup: ^2.50.0
vite: ^2.3.0
webpack: 4 || 5
peerDependenciesMeta:
esbuild:
optional: true
rollup:
optional: true
vite:
optional: true
webpack:
optional: true
dependencies:
chokidar: registry.npmjs.org/chokidar/3.5.3
rollup: 2.70.1
vite: 2.9.0-beta.3_less@4.1.2
webpack-virtual-modules: registry.npmjs.org/webpack-virtual-modules/0.4.3
dev: true
registry.npmjs.org/uri-js/4.4.1: registry.npmjs.org/uri-js/4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz} resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz}
name: uri-js name: uri-js
...@@ -13053,6 +13221,12 @@ packages: ...@@ -13053,6 +13221,12 @@ packages:
version: 4.0.2 version: 4.0.2
dev: true dev: true
registry.npmjs.org/webpack-virtual-modules/0.4.3:
resolution: {integrity: sha512-5NUqC2JquIL2pBAAo/VfBP6KuGkHIZQXW/lNKupLPfhViwh8wNsu0BObtl09yuKZszeEUfbXz8xhrHvSG16Nqw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.4.3.tgz}
name: webpack-virtual-modules
version: 0.4.3
dev: true
registry.npmjs.org/whatwg-url/5.0.0: registry.npmjs.org/whatwg-url/5.0.0:
resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz} resolution: {integrity: sha1-lmRU6HZUYuN2RNNib2dCzotwll0=, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz}
name: whatwg-url name: whatwg-url
......
import { Interface, BaseClass, Property, CodeGenerator } from 'pont-engine' import { Interface, BaseClass, Property, CodeGenerator, Surrounding } from 'pont-engine'
export default class MyGenerator extends CodeGenerator { export default class BasicGenerator extends CodeGenerator {
getParams(inter: Interface) { getParams(inter: Interface) {
const requestParams = inter.getRequestParams(this.surrounding) const requestParams = inter.getRequestParams(this.surrounding)
...@@ -52,14 +52,14 @@ export default class MyGenerator extends CodeGenerator { ...@@ -52,14 +52,14 @@ export default class MyGenerator extends CodeGenerator {
*/ */
import * as defs from '../../baseClass'; import * as defs from '../../baseClass';
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export ${paramsCode} export ${paramsCode}
export const init = ${inter.response.getInitialValue()}; export const init = ${inter.response.getInitialValue()};
export function request(${requestParams}) { export function request(${requestParams}) {
return defHttp.request({ return Http.request({
url: "${inter.path}", url: "${inter.path}",
method: '${method}', method: '${method}',
${ ${
...@@ -73,4 +73,71 @@ export default class MyGenerator extends CodeGenerator { ...@@ -73,4 +73,71 @@ export default class MyGenerator extends CodeGenerator {
} }
` `
} }
reviseModName(modName: string) {
// .replace(/\//g, '.').replace(/^\./, '').replace(/\./g, '_') 转换 / .为下划线
// exp: /api/v1/users => api_v1_users
// exp: api.v1.users => api_v1_users
return modName.replace(/\//g, '.').replace(/^\./, '').replace(/\./g, '_')
}
/** 获取所有模块的 index 入口文件 */
getModsIndex() {
const isTypeScript = this.surrounding === Surrounding.typeScript
let conclusion = `
export const API = {
${this.dataSource.mods.map((mod) => this.reviseModName(mod.name)).join(', \n')}
};
const getWindow = ()${isTypeScript ? ': any' : ''} => (typeof window === 'undefined' ? {} : window)
getWindow().API = API
`
// dataSource name means multiple dataSource
if (this.dataSource.name) {
conclusion = `
export const ${this.dataSource.name} = {
${this.dataSource.mods.map((mod) => this.reviseModName(mod.name)).join(', \n')}
};
`
}
return `
${this.dataSource.mods
.map((mod) => {
const modName = this.reviseModName(mod.name)
return `import * as ${modName} from './${modName}';`
})
.join('\n')}
${conclusion}
`
}
/** 获取接口类和基类的总的 index 入口文件代码 */
getIndex() {
const isTypeScript = this.surrounding === Surrounding.typeScript
let conclusion = `
import * as defs from './baseClass';
import './mods/';
export { defs };
const getWindow = ()${isTypeScript ? ': any' : ''} => (typeof window === 'undefined' ? {} : window)
getWindow().defs = defs
`
// dataSource name means multiple dataSource
if (this.dataSource.name) {
conclusion = `
import { ${this.dataSource.name} as defs } from './baseClass';
export { ${this.dataSource.name} } from './mods/';
export { defs };
`
}
return conclusion
}
} }
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
"description": "", "description": "",
"interfaces": [ "interfaces": [
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "登录", "description": "登录",
"name": "login", "name": "login",
"method": "post", "method": "post",
...@@ -89,7 +91,9 @@ ...@@ -89,7 +91,9 @@
"parameters": [] "parameters": []
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "注册", "description": "注册",
"name": "register", "name": "register",
"method": "post", "method": "post",
...@@ -385,7 +389,10 @@ ...@@ -385,7 +389,10 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'ASC'", "'DESC'"], "enum": [
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
...@@ -398,7 +405,9 @@ ...@@ -398,7 +405,9 @@
"description": "", "description": "",
"interfaces": [ "interfaces": [
{ {
"consumes": ["multipart/form-data"], "consumes": [
"multipart/form-data"
],
"description": "文件上传", "description": "文件上传",
"name": "upload", "name": "upload",
"method": "post", "method": "post",
...@@ -447,7 +456,9 @@ ...@@ -447,7 +456,9 @@
"description": "", "description": "",
"interfaces": [ "interfaces": [
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "新增", "description": "新增",
"name": "add", "name": "add",
"method": "post", "method": "post",
...@@ -603,7 +614,10 @@ ...@@ -603,7 +614,10 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'MENU'", "'BUTTON'"], "enum": [
"'MENU'",
"'BUTTON'"
],
"typeProperties": [] "typeProperties": []
} }
}, },
...@@ -625,7 +639,9 @@ ...@@ -625,7 +639,9 @@
] ]
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "删除", "description": "删除",
"name": "deleted", "name": "deleted",
"method": "post", "method": "post",
...@@ -710,7 +726,9 @@ ...@@ -710,7 +726,9 @@
] ]
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "修改", "description": "修改",
"name": "modify", "name": "modify",
"method": "post", "method": "post",
...@@ -881,7 +899,10 @@ ...@@ -881,7 +899,10 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'MENU'", "'BUTTON'"], "enum": [
"'MENU'",
"'BUTTON'"
],
"typeProperties": [] "typeProperties": []
} }
}, },
...@@ -993,14 +1014,19 @@ ...@@ -993,14 +1014,19 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'ASC'", "'DESC'"], "enum": [
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
] ]
}, },
{ {
"consumes": ["application/x-www-form-urlencoded"], "consumes": [
"application/x-www-form-urlencoded"
],
"description": "树结构查询", "description": "树结构查询",
"name": "tree", "name": "tree",
"method": "get", "method": "get",
...@@ -1059,7 +1085,9 @@ ...@@ -1059,7 +1085,9 @@
"description": "", "description": "",
"interfaces": [ "interfaces": [
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "新增", "description": "新增",
"name": "add", "name": "add",
"method": "post", "method": "post",
...@@ -1117,7 +1145,9 @@ ...@@ -1117,7 +1145,9 @@
] ]
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "分配权限", "description": "分配权限",
"name": "assign", "name": "assign",
"method": "post", "method": "post",
...@@ -1175,7 +1205,9 @@ ...@@ -1175,7 +1205,9 @@
] ]
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "删除", "description": "删除",
"name": "deleted", "name": "deleted",
"method": "post", "method": "post",
...@@ -1260,7 +1292,9 @@ ...@@ -1260,7 +1292,9 @@
] ]
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "修改", "description": "修改",
"name": "modify", "name": "modify",
"method": "post", "method": "post",
...@@ -1423,7 +1457,10 @@ ...@@ -1423,7 +1457,10 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'ASC'", "'DESC'"], "enum": [
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
...@@ -1498,7 +1535,9 @@ ...@@ -1498,7 +1535,9 @@
"parameters": [] "parameters": []
}, },
{ {
"consumes": ["application/json"], "consumes": [
"application/json"
],
"description": "分配角色", "description": "分配角色",
"name": "assign", "name": "assign",
"method": "post", "method": "post",
...@@ -1646,7 +1685,10 @@ ...@@ -1646,7 +1685,10 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'ASC'", "'DESC'"], "enum": [
"'ASC'",
"'DESC'"
],
"typeProperties": [] "typeProperties": []
} }
} }
...@@ -1905,7 +1947,10 @@ ...@@ -1905,7 +1947,10 @@
"isDefsType": false, "isDefsType": false,
"templateIndex": -1, "templateIndex": -1,
"compileTemplateKeyword": "#/definitions/", "compileTemplateKeyword": "#/definitions/",
"enum": ["'MENU'", "'BUTTON'"], "enum": [
"'MENU'",
"'BUTTON'"
],
"typeProperties": [] "typeProperties": []
}, },
"name": "type", "name": "type",
......
import * as defs from './baseClass' import * as defs from './baseClass'
import './mods/' import './mods/'
;(window as any).defs = defs
export { defs }
const getWindow = (): any => (typeof window === 'undefined' ? {} : window)
getWindow().defs = defs
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 账号(支持用户名/手机号/邮箱) */ /** 账号(支持用户名/手机号/邮箱) */
...@@ -15,7 +15,7 @@ export class Params { ...@@ -15,7 +15,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/auth/login', url: '/basic-api/auth/login',
method: 'POST', method: 'POST',
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/auth/logout', url: '/basic-api/auth/logout',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 头像 */ /** 头像 */
...@@ -27,7 +27,7 @@ export class Params { ...@@ -27,7 +27,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/auth/register', url: '/basic-api/auth/register',
method: 'POST', method: 'POST',
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/hello/fail', url: '/basic-api/hello/fail',
method: 'GET', method: 'GET',
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/hello/', url: '/basic-api/hello/',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** 当前页数 */
...@@ -19,7 +19,7 @@ export class Params { ...@@ -19,7 +19,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/hello/page', url: '/basic-api/hello/page',
method: 'GET', method: 'GET',
......
...@@ -4,7 +4,8 @@ import * as minio from './minio' ...@@ -4,7 +4,8 @@ import * as minio from './minio'
import * as permission from './permission' import * as permission from './permission'
import * as role from './role' import * as role from './role'
import * as user from './user' import * as user from './user'
;(window as any).API = {
export const API = {
auth, auth,
hello, hello,
minio, minio,
...@@ -12,3 +13,6 @@ import * as user from './user' ...@@ -12,3 +13,6 @@ import * as user from './user'
role, role,
user, user,
} }
const getWindow = (): any => (typeof window === 'undefined' ? {} : window)
getWindow().API = API
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params {} export class Params {}
...@@ -15,7 +15,7 @@ export function request( ...@@ -15,7 +15,7 @@ export function request(
config?: axios.RequestConfig<Params | FormData>, config?: axios.RequestConfig<Params | FormData>,
options?: axios.RequestOptions, options?: axios.RequestOptions,
) { ) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/common/minio/upload', url: '/basic-api/common/minio/upload',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 组件 */ /** 组件 */
...@@ -31,7 +31,7 @@ export class Params { ...@@ -31,7 +31,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/permission/add', url: '/basic-api/manage/permission/add',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -13,7 +13,7 @@ export class Params { ...@@ -13,7 +13,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/permission/deleted', url: '/basic-api/manage/permission/deleted',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -13,7 +13,7 @@ export class Params { ...@@ -13,7 +13,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/permission/find', url: '/basic-api/manage/permission/find',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 组件 */ /** 组件 */
...@@ -33,7 +33,7 @@ export class Params { ...@@ -33,7 +33,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/permission/modify', url: '/basic-api/manage/permission/modify',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** 当前页数 */
...@@ -19,7 +19,7 @@ export class Params { ...@@ -19,7 +19,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/permission/page', url: '/basic-api/manage/permission/page',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 父级 id */ /** 父级 id */
...@@ -13,7 +13,7 @@ export class Params { ...@@ -13,7 +13,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/permission/tree', url: '/basic-api/manage/permission/tree',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 名称 */ /** 名称 */
...@@ -15,7 +15,7 @@ export class Params { ...@@ -15,7 +15,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/add', url: '/basic-api/manage/role/add',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -15,7 +15,7 @@ export class Params { ...@@ -15,7 +15,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/assign', url: '/basic-api/manage/role/assign',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -13,7 +13,7 @@ export class Params { ...@@ -13,7 +13,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/deleted', url: '/basic-api/manage/role/deleted',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -13,7 +13,7 @@ export class Params { ...@@ -13,7 +13,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/find', url: '/basic-api/manage/role/find',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -17,7 +17,7 @@ export class Params { ...@@ -17,7 +17,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/modify', url: '/basic-api/manage/role/modify',
method: 'POST', method: 'POST',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** 当前页数 */
...@@ -19,7 +19,7 @@ export class Params { ...@@ -19,7 +19,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/page', url: '/basic-api/manage/role/page',
method: 'GET', method: 'GET',
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/manage/role/selector', url: '/basic-api/manage/role/selector',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** id */ /** id */
...@@ -15,7 +15,7 @@ export class Params { ...@@ -15,7 +15,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/user/manage/assign', url: '/basic-api/user/manage/assign',
method: 'POST', method: 'POST',
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params {} export class Params {}
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/user/info', url: '/basic-api/user/info',
method: 'GET', method: 'GET',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
import * as defs from '../../baseClass' import * as defs from '../../baseClass'
import { defHttp } from '/@/utils/http/axios' import { Http } from '/@/utils/http/axios'
export class Params { export class Params {
/** 当前页数 */ /** 当前页数 */
...@@ -19,7 +19,7 @@ export class Params { ...@@ -19,7 +19,7 @@ export class Params {
export const init = new defs.Result() export const init = new defs.Result()
export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) { export function request(params: Params, config?: axios.RequestConfig<Params>, options?: axios.RequestOptions) {
return defHttp.request( return Http.request(
{ {
url: '/basic-api/user/manage/page', url: '/basic-api/user/manage/page',
method: 'GET', method: 'GET',
......
export interface Result<T = any> {
/**
* 状态码
*/
status: Status
/**
* 消息
*/
message: string
/**
* 响应时间
*/
timestamp: string
/**
* 接口耗时(不含网络通信时间)
*/
times: string
/**
* 自定义错误码
*/
code: number
/**
* 详细信息
*/
details?: string
/**
* 异常信息
*/
error?: string
/**
* 响应内容
*/
body: T
}
export enum Status {
/**
* 成功
*/
OK = 200,
/**
* 用户认证失败
*/
NON_AUTHORITATIVE_INFORMATION = 203,
/**
* 失败的请求,通常是一些验证错误(当出现该状态码时,将产生对应的业务错误编码,可以使用 Result.details 进行交互提醒)
*/
FAIL = 400,
/**
* 鉴权失败
*/
UNAUTHORIZED = 401,
/**
* Token 错误/失效
*/
FORBIDDEN = 403,
/**
* 找不到资源
*/
NOT_FOUND = 404,
/**
* 不支持的请求类型
*/
METHOD_NOT_ALLOWED = 405,
/**
* 服务器错误
*/
INTERNAL_SERVER_ERROR = 500,
/**
* 未知错误
*/
UNKNOWN_ERROR = 500,
/**
* API 未实现
*/
NOT_IMPLEMENTED = 501,
/**
* 服务异常(网关提醒)
*/
BAD_GATEWAY = 502,
/**
* 服务暂停(网关提醒)
*/
SERVICE_UNAVAILABLE = 503,
}
export function toMessage(status: Status): string {
switch (status) {
case Status.OK:
return '成功'
case Status.FAIL:
return '失败'
case Status.UNAUTHORIZED:
return '用户认证失败'
case Status.FORBIDDEN:
return '拒绝访问'
case Status.NOT_FOUND:
return '找不到资源'
case Status.INTERNAL_SERVER_ERROR:
return '服务器错误'
case Status.NOT_IMPLEMENTED:
return '未实现'
case Status.BAD_GATEWAY:
return '网关错误'
case Status.SERVICE_UNAVAILABLE:
return '服务暂停'
default:
return '未知错误'
}
}
const config: Application = {
name: __APP__.name,
version: __APP__.version,
description: __APP__.description,
author: __APP__.author,
lastBuildTime: __APP__.lastBuildTime,
}
export const $app = config
export function setupAppConfig() {
// 打印 App 信息
const infos: string[] = []
infos.push(`==================================================================`)
infos.push(`[App] name: ${config.name}`)
infos.push(`[App] version: ${config.version}`)
infos.push(`[App] description: ${config.description}`)
infos.push(`[App] author: ${config.author.name} ${config.author.url}`)
infos.push(`[App] lastBuildTime: ${config.lastBuildTime}`)
infos.push(`==================================================================`)
console.log('%c' + infos.join('\n'), 'color: #fadfa3;')
}
...@@ -13,14 +13,18 @@ import { setupRouterGuard } from '/@/router/guard' ...@@ -13,14 +13,18 @@ import { setupRouterGuard } from '/@/router/guard'
import { setupStore } from '/@/store' import { setupStore } from '/@/store'
import { setupGlobDirectives } from '/@/directives' import { setupGlobDirectives } from '/@/directives'
import { setupI18n } from '/@/locales/setupI18n' import { setupI18n } from '/@/locales/setupI18n'
import { setupAppConfig } from '/@/config/app'
import { registerGlobComp } from '/@/components/registerGlobComp' import { registerGlobComp } from '/@/components/registerGlobComp'
// 全局注入 API // 全局注入 API
import '/@/api/services/mods' // import '/@/api/services/mods'
async function bootstrap() { async function bootstrap() {
const app = createApp(App) const app = createApp(App)
// App 配置
setupAppConfig()
// Configure store // Configure store
setupStore(app) setupStore(app)
......
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
import type { AxiosResponse } from 'axios' import type { AxiosResponse } from 'axios'
import { clone } from 'lodash-es' import { clone } from 'lodash-es'
import type { RequestOptions, Result } from '/#/axios' import type { RequestOptions } from '/#/axios'
import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform' import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform'
import { VAxios } from './Axios' import { VAxios } from './Axios'
import { checkStatus } from './checkStatus' import { checkStatus } from './checkStatus'
import { useGlobSetting } from '/@/hooks/setting' import { useGlobSetting } from '/@/hooks/setting'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { RequestEnum, ResultEnum, ContentTypeEnum } from '/@/enums/httpEnum' import { RequestEnum, ContentTypeEnum } from '/@/enums/httpEnum'
import { isString } from '/@/utils/is' import { isString } from '/@/utils/is'
import { getToken } from '/@/utils/auth' import { getToken } from '/@/utils/auth'
import { setObjToUrlParams, deepMerge } from '/@/utils' import { setObjToUrlParams, deepMerge } from '/@/utils'
...@@ -18,6 +18,7 @@ import { useI18n } from '/@/hooks/web/useI18n' ...@@ -18,6 +18,7 @@ import { useI18n } from '/@/hooks/web/useI18n'
import { joinTimestamp, formatRequestDate } from './helper' import { joinTimestamp, formatRequestDate } from './helper'
import { useUserStoreWithOut } from '/@/store/modules/user' import { useUserStoreWithOut } from '/@/store/modules/user'
import { AxiosRetry } from '/@/utils/http/axios/axiosRetry' import { AxiosRetry } from '/@/utils/http/axios/axiosRetry'
import * as HTTP from '/@/api/types'
const globSetting = useGlobSetting() const globSetting = useGlobSetting()
const urlPrefix = globSetting.urlPrefix const urlPrefix = globSetting.urlPrefix
...@@ -30,7 +31,7 @@ const transform: AxiosTransform = { ...@@ -30,7 +31,7 @@ const transform: AxiosTransform = {
/** /**
* @description: 处理请求数据。如果数据不是预期格式,可直接抛出错误 * @description: 处理请求数据。如果数据不是预期格式,可直接抛出错误
*/ */
transformRequestHook: (res: AxiosResponse<Result>, options: RequestOptions) => { transformRequestHook: (res: AxiosResponse<defs.Result>, options: RequestOptions) => {
const { t } = useI18n() const { t } = useI18n()
const { isTransformResponse, isReturnNativeResponse } = options const { isTransformResponse, isReturnNativeResponse } = options
// 是否返回原生响应头 比如:需要获取响应头时使用该属性 // 是否返回原生响应头 比如:需要获取响应头时使用该属性
...@@ -49,27 +50,29 @@ const transform: AxiosTransform = { ...@@ -49,27 +50,29 @@ const transform: AxiosTransform = {
// return '[HTTP] Request has no return value'; // return '[HTTP] Request has no return value';
throw new Error(t('sys.api.apiRequestFailed')) throw new Error(t('sys.api.apiRequestFailed'))
} }
// 这里 code,result,message为 后台统一的字段,需要在 types.ts内修改为项目自己的接口返回格式 // 这里 status,body,message为 后台统一的字段,需要在 types.ts 内修改为项目自己的接口返回格式
const { code, result, message } = data const { status, body, message, details } = data
// 这里逻辑可以根据项目进行修改 // 这里逻辑可以根据项目进行修改
const hasSuccess = data && Reflect.has(data, 'code') && code === ResultEnum.SUCCESS const hasSuccess = data && Reflect.has(data, 'status') && status === HTTP.Status.OK
if (hasSuccess) { if (hasSuccess) {
return result return body
} }
// 在此处根据自己项目的实际情况对不同的code执行不同的操作 // 在此处根据自己项目的实际情况对不同的code执行不同的操作
// 如果不希望中断当前请求,请return数据,否则直接抛出异常即可 // 如果不希望中断当前请求,请return数据,否则直接抛出异常即可
let timeoutMsg = '' let timeoutMsg = ''
switch (code) { switch (status) {
case ResultEnum.TIMEOUT: case HTTP.Status.UNAUTHORIZED:
timeoutMsg = t('sys.api.timeoutMessage') timeoutMsg = t('sys.api.timeoutMessage')
const userStore = useUserStoreWithOut() const userStore = useUserStoreWithOut()
userStore.setToken(undefined) userStore.setToken(undefined)
userStore.logout(true) userStore.logout(true)
break break
default: default:
if (message) { if (details) {
timeoutMsg = details
} else if (message) {
timeoutMsg = message timeoutMsg = message
} }
} }
...@@ -251,8 +254,20 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) { ...@@ -251,8 +254,20 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
), ),
) )
} }
export const defHttp = createAxios() export const defHttp = createAxios()
// 自定义配置
// TODO: 实际项目所需的请求配置
// const { apiUrl } = useGlobSetting()
const apiUrl = 'http://localhost:8181'
export const Http = createAxios({
headers: { 'Content-Type': ContentTypeEnum.FORM_URLENCODED },
requestOptions: {
apiUrl,
},
})
// other api url // other api url
// export const otherHttp = createAxios({ // export const otherHttp = createAxios({
// requestOptions: { // requestOptions: {
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
const rememberMe = ref(false) const rememberMe = ref(false)
const formData = reactive({ const formData = reactive({
account: 'vben', account: 'basic',
password: '123456', password: '123456',
}) })
......
import { Result } from '../utils'; import { Result } from '../utils'
const fakeUserInfo = { const fakeUserInfo = {
userId: '1', userId: '1',
...@@ -13,13 +13,13 @@ const fakeUserInfo = { ...@@ -13,13 +13,13 @@ const fakeUserInfo = {
value: 'super', value: 'super',
}, },
], ],
}; }
export default class UserService { export default class UserService {
async login() { async login() {
return Result.success(fakeUserInfo); return Result.success(fakeUserInfo)
} }
async getUserInfoById() { async getUserInfoById() {
return Result.success(fakeUserInfo); return Result.success(fakeUserInfo)
} }
} }
/**
* App 信息
*/
type Application = {
/**
* 项目名称
*/
name: string
/**
* 版本号
*/
version: string
/**
* 项目描述信息
*/
description: string
/**
* 作者
*/
author: Author
/**
* 最后构建时间
*/
lastBuildTime: string
}
/**
* App 作者信息
*/
type Author = {
/**
* 作者名称
*/
name: string
/**
* 地址
*/
url: string
}
declare const __APP__: Application
// Generated by 'unplugin-auto-import'
// We suggest you to commit this file into source control
declare global {
const $app: typeof import('/@/config/app')['$app']
const API: typeof import('/@/api/services/mods')['API']
const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope']
const EffectScope: typeof import('vue')['EffectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef']
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
}
export {}
interface Window {
/**
* API 接口实例 Window 挂载
* api.d.ts
*/
API: API
/**
* API 接口类型引用 Window 挂载
* api.d.ts
*/
defs: defs
}
...@@ -87,6 +87,13 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { ...@@ -87,6 +87,13 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
// Suppress warning // Suppress warning
__INTLIFY_PROD_DEVTOOLS__: false, __INTLIFY_PROD_DEVTOOLS__: false,
__APP_INFO__: JSON.stringify(__APP_INFO__), __APP_INFO__: JSON.stringify(__APP_INFO__),
__APP__: {
name: pkg.name,
version: pkg.version,
description: pkg.description,
author: pkg.author,
lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
},
}, },
css: { css: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论