build & ci: 修改打包工具为Vite

This commit is contained in:
lblblong
2021-11-02 14:22:17 +08:00
parent e503d77cf5
commit cc0d6beb3e
25 changed files with 505 additions and 77 deletions
-1
View File
@@ -1 +0,0 @@
GENERATE_SOURCEMAP = false
+1
View File
@@ -0,0 +1 @@
public-hoist-pattern[]=querystring
-18
View File
@@ -1,18 +0,0 @@
const CracoAlias = require('craco-alias')
module.exports = {
eslint: {
enable: false,
model: 'file',
},
plugins: [
{
plugin: CracoAlias,
options: {
source: 'tsconfig',
baseUrl: './',
tsConfigPath: './tsconfig.path.json',
},
},
],
}
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="./public/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./public/icon/fonts/icon.css">
<title>Vite App</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./src/index.tsx"></script>
</body>
</html>
+7 -7
View File
@@ -1,15 +1,15 @@
{
"name": "nat-utools-lerna",
"version": "2.0.0",
"name": "nat-utools",
"version": "2.0.1",
"description": "",
"homepage": ".",
"author": "lblblong",
"license": "ISC",
"scripts": {
"serve": "nodemon --watch src -e tsx,scss,ts,css --exec craco build",
"serve": "vite build -w",
"serve:preload": "cd ./packages/preload && npm run serve",
"build": "npm run build:html && npm run build:preload",
"build:html": "rm -rf ./utools/build && craco build && cp -r ./build ./utools",
"build:html": "rm -rf ./utools/build && vite build && cp -r ./build ./utools",
"build:preload": "cd ./packages/preload && npm run build",
"commit": "git-cz"
},
@@ -25,20 +25,20 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
"@craco/craco": "^6.3.0",
"@types/localtunnel": "^2.0.1",
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@vitejs/plugin-react": "^1.0.7",
"commitizen": "^4.2.4",
"craco-alias": "^3.0.1",
"csstype": "^3.0.9",
"cz-customizable": "^6.3.0",
"react-scripts": "4.0.3",
"sass": "^1.42.1",
"typescript": "^4.1.2",
"utility-types": "^3.10.0",
"utools-helper": "^1.4.6"
"utools-helper": "^1.4.6",
"vite": "^2.6.13"
},
"config": {
"commitizen": {
+445 -30
View File
@@ -4,15 +4,14 @@ importers:
.:
specifiers:
'@craco/craco': ^6.3.0
'@types/localtunnel': ^2.0.1
'@types/node': ^12.0.0
'@types/react': ^17.0.0
'@types/react-dom': ^17.0.0
'@vitejs/plugin-react': ^1.0.7
ajax-hook: ^2.0.3
classnames: ^2.3.1
commitizen: ^4.2.4
craco-alias: ^3.0.1
csstype: ^3.0.9
cz-customizable: ^6.3.0
dayjs: ^1.10.7
@@ -27,6 +26,7 @@ importers:
typescript: ^4.1.2
utility-types: ^3.10.0
utools-helper: ^1.4.6
vite: ^2.6.13
dependencies:
ajax-hook: 2.0.3
classnames: 2.3.1
@@ -38,13 +38,12 @@ importers:
react: 17.0.2
react-dom: 17.0[email protected]
devDependencies:
'@craco/craco': 6.3[email protected]
'@types/localtunnel': 2.0.1
'@types/node': 12.20.28
'@types/react': 17.0.27
'@types/react-dom': 17.0.9
'@vitejs/plugin-react': 1.0.7
commitizen: 4.2.4
craco-alias: 3.0.1
csstype: 3.0.9
cz-customizable: 6.3.0
react-scripts: 4.0.3_9738f2913b09a21865393806ccc0e642
@@ -52,6 +51,7 @@ importers:
typescript: 4.4.3
utility-types: 3.10.0
utools-helper: 1.5.1
vite: 2.6[email protected]
packages/localtunnel:
specifiers:
@@ -674,6 +674,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-async-generators/7.8.4_@[email protected]:
resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-bigint/7.8.3_@[email protected]:
resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==}
peerDependencies:
@@ -683,6 +692,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-bigint/7.8.3_@[email protected]:
resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-class-properties/7.12.13_@[email protected]:
resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
peerDependencies:
@@ -692,6 +710,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-class-properties/7.12.13_@[email protected]:
resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-class-static-block/7.14.5_@[email protected]:
resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==}
engines: {node: '>=6.9.0'}
@@ -759,6 +786,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-import-meta/7.10.4_@[email protected]:
resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-json-strings/7.8.3_@[email protected]:
resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
@@ -768,6 +804,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-json-strings/7.8.3_@[email protected]:
resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-jsx/7.14.5_@[email protected]:
resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==}
engines: {node: '>=6.9.0'}
@@ -778,6 +823,16 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-jsx/7.14.5_@[email protected]:
resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-logical-assignment-operators/7.10.4_@[email protected]:
resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
@@ -787,6 +842,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-logical-assignment-operators/7.10.4_@[email protected]:
resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@[email protected]:
resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
peerDependencies:
@@ -796,6 +860,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@[email protected]:
resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-numeric-separator/7.10.4_@[email protected]:
resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
peerDependencies:
@@ -805,6 +878,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-numeric-separator/7.10.4_@[email protected]:
resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-object-rest-spread/7.8.3_@[email protected]:
resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
peerDependencies:
@@ -814,6 +896,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-object-rest-spread/7.8.3_@[email protected]:
resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-optional-catch-binding/7.8.3_@[email protected]:
resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
peerDependencies:
@@ -823,6 +914,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-optional-catch-binding/7.8.3_@[email protected]:
resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-optional-chaining/7.8.3_@[email protected]:
resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
peerDependencies:
@@ -832,6 +932,15 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-optional-chaining/7.8.3_@[email protected]:
resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-private-property-in-object/7.14.5_@[email protected]:
resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==}
engines: {node: '>=6.9.0'}
@@ -852,6 +961,16 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-top-level-await/7.14.5_@[email protected]:
resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-syntax-typescript/7.14.5_@[email protected]:
resolution: {integrity: sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==}
engines: {node: '>=6.9.0'}
@@ -1188,6 +1307,16 @@ packages:
'@babel/plugin-transform-react-jsx': 7.14.9_@[email protected]
dev: true
/@babel/plugin-transform-react-jsx-development/7.14.5_@[email protected]:
resolution: {integrity: sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/plugin-transform-react-jsx': 7.14.9_@[email protected]
dev: true
/@babel/plugin-transform-react-jsx-self/7.14.9_@[email protected]:
resolution: {integrity: sha512-Fqqu0f8zv9W+RyOnx29BX/RlEsBRANbOf5xs5oxb2aHP4FKbLXxIaVPUiCti56LAR1IixMH4EyaixhUsKqoBHw==}
engines: {node: '>=6.9.0'}
@@ -1198,6 +1327,16 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-transform-react-jsx-self/7.14.9_@[email protected]:
resolution: {integrity: sha512-Fqqu0f8zv9W+RyOnx29BX/RlEsBRANbOf5xs5oxb2aHP4FKbLXxIaVPUiCti56LAR1IixMH4EyaixhUsKqoBHw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-transform-react-jsx-source/7.14.5_@[email protected]:
resolution: {integrity: sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==}
engines: {node: '>=6.9.0'}
@@ -1208,6 +1347,16 @@ packages:
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-transform-react-jsx-source/7.14.5_@[email protected]:
resolution: {integrity: sha512-1TpSDnD9XR/rQ2tzunBVPThF5poaYT9GqP+of8fAtguYuI/dm2RkrMBDemsxtY0XBzvW7nXjYM0hRyKX9QYj7Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-plugin-utils': 7.14.5
dev: true
/@babel/plugin-transform-react-jsx/7.14.9_@[email protected]:
resolution: {integrity: sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==}
engines: {node: '>=6.9.0'}
@@ -1222,6 +1371,20 @@ packages:
'@babel/types': 7.15.6
dev: true
/@babel/plugin-transform-react-jsx/7.14.9_@[email protected]:
resolution: {integrity: sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.15.8
'@babel/helper-annotate-as-pure': 7.15.4
'@babel/helper-module-imports': 7.15.4
'@babel/helper-plugin-utils': 7.14.5
'@babel/plugin-syntax-jsx': 7.14.5_@[email protected]
'@babel/types': 7.15.6
dev: true
/@babel/plugin-transform-react-pure-annotations/7.14.5_@[email protected]:
resolution: {integrity: sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==}
engines: {node: '>=6.9.0'}
@@ -1675,20 +1838,6 @@ packages:
dev: true
optional: true
/@craco/craco/[email protected]:
resolution: {integrity: sha512-SCnfEQxT/6NAbU/3sIWw7gQXtzjjiTp/EZFdJTd8inPURILIy0YajrC2p8qBG2KhFo5cwgOrEDyaGyAFvvuyuA==}
engines: {node: '>=6'}
hasBin: true
peerDependencies:
react-scripts: ^4.0.0
dependencies:
cross-spawn: 7.0.3
lodash: 4.17.21
react-scripts: 4.0.3_9738f2913b09a21865393806ccc0e642
semver: 7.3.5
webpack-merge: 4.2.2
dev: true
/@csstools/convert-colors/1.4.0:
resolution: {integrity: sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==}
engines: {node: '>=4.0.0'}
@@ -2758,6 +2907,14 @@ packages:
rollup: 1.32.1
dev: true
/@rollup/pluginutils/4.1.1:
resolution: {integrity: sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==}
engines: {node: '>= 8.0.0'}
dependencies:
estree-walker: 2.0.2
picomatch: 2.3.0
dev: true
/@sinonjs/commons/1.8.3:
resolution: {integrity: sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==}
dependencies:
@@ -3265,6 +3422,22 @@ packages:
resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==}
dev: true
/@vitejs/plugin-react/1.0.7:
resolution: {integrity: sha512-dzxzohFOAVVXpGlFn6Uvw2xaSLp80Vjmg2e5G1XdMV266vVKrcDqg9CWP/AiJiXuubNUdgy1k4E8dNXI6WCyhw==}
engines: {node: '>=12.0.0'}
dependencies:
'@babel/core': 7.15.8
'@babel/plugin-transform-react-jsx': 7.14.9_@[email protected]
'@babel/plugin-transform-react-jsx-development': 7.14.5_@[email protected]
'@babel/plugin-transform-react-jsx-self': 7.14.9_@[email protected]
'@babel/plugin-transform-react-jsx-source': 7.14.5_@[email protected]
'@rollup/pluginutils': 4.1.1
react-refresh: 0.10.0
resolve: 1.20.0
transitivePeerDependencies:
- supports-color
dev: true
/@webassemblyjs/ast/1.9.0:
resolution: {integrity: sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==}
dependencies:
@@ -3907,6 +4080,25 @@ packages:
- supports-color
dev: true
/babel-jest/26.6.3_@[email protected]:
resolution: {integrity: sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==}
engines: {node: '>= 10.14.2'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.15.8
'@jest/transform': 26.6.2
'@jest/types': 26.6.2
'@types/babel__core': 7.1.16
babel-plugin-istanbul: 6.0.0
babel-preset-jest: 26.6.2_@[email protected]
chalk: 4.1.2
graceful-fs: 4.2.8
slash: 3.0.0
transitivePeerDependencies:
- supports-color
dev: true
/babel-loader/8.1.0_427212bc1158d185e577033f19ca0757:
resolution: {integrity: sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw==}
engines: {node: '>= 6.9'}
@@ -4039,6 +4231,26 @@ packages:
'@babel/plugin-syntax-top-level-await': 7.14.5_@[email protected]
dev: true
/babel-preset-current-node-syntax/1.0.1_@[email protected]:
resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.15.8
'@babel/plugin-syntax-async-generators': 7.8.4_@[email protected]
'@babel/plugin-syntax-bigint': 7.8.3_@[email protected]
'@babel/plugin-syntax-class-properties': 7.12.13_@[email protected]
'@babel/plugin-syntax-import-meta': 7.10.4_@[email protected]
'@babel/plugin-syntax-json-strings': 7.8.3_@[email protected]
'@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@[email protected]
'@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@[email protected]
'@babel/plugin-syntax-numeric-separator': 7.10.4_@[email protected]
'@babel/plugin-syntax-object-rest-spread': 7.8.3_@[email protected]
'@babel/plugin-syntax-optional-catch-binding': 7.8.3_@[email protected]
'@babel/plugin-syntax-optional-chaining': 7.8.3_@[email protected]
'@babel/plugin-syntax-top-level-await': 7.14.5_@[email protected]
dev: true
/babel-preset-jest/26.6.2_@[email protected]:
resolution: {integrity: sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==}
engines: {node: '>= 10.14.2'}
@@ -4050,6 +4262,17 @@ packages:
babel-preset-current-node-syntax: 1.0.1_@[email protected]
dev: true
/babel-preset-jest/26.6.2_@[email protected]:
resolution: {integrity: sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==}
engines: {node: '>= 10.14.2'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/core': 7.15.8
babel-plugin-jest-hoist: 26.6.2
babel-preset-current-node-syntax: 1.0.1_@[email protected]
dev: true
/babel-preset-react-app/10.0.0:
resolution: {integrity: sha512-itL2z8v16khpuKutx5IH8UdCdSTuzrOhRFTEdIhveZ2i1iBKDrVE0ATa4sFVy+02GLucZNVBWtoarXBy0Msdpg==}
dependencies:
@@ -5022,10 +5245,6 @@ packages:
yaml: 1.10.2
dev: true
/craco-alias/3.0.1:
resolution: {integrity: sha512-N+Qaf/Gr/f3o5ZH2TQjMu5NhR9PnT1ZYsfejpNvZPpB0ujdrhsSr4Ct6GVjnV5ostCVquhTKJpIVBKyL9qDQYA==}
dev: true
/create-ecdh/4.0.4:
resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==}
dependencies:
@@ -6061,6 +6280,166 @@ packages:
ext: 1.6.0
dev: true
/esbuild-android-arm64/0.13.12:
resolution: {integrity: sha512-TSVZVrb4EIXz6KaYjXfTzPyyRpXV5zgYIADXtQsIenjZ78myvDGaPi11o4ZSaHIwFHsuwkB6ne5SZRBwAQ7maw==}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
/esbuild-darwin-64/0.13.12:
resolution: {integrity: sha512-c51C+N+UHySoV2lgfWSwwmlnLnL0JWj/LzuZt9Ltk9ub1s2Y8cr6SQV5W3mqVH1egUceew6KZ8GyI4nwu+fhsw==}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/esbuild-darwin-arm64/0.13.12:
resolution: {integrity: sha512-JvAMtshP45Hd8A8wOzjkY1xAnTKTYuP/QUaKp5eUQGX+76GIie3fCdUUr2ZEKdvpSImNqxiZSIMziEiGB5oUmQ==}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/esbuild-freebsd-64/0.13.12:
resolution: {integrity: sha512-r6On/Skv9f0ZjTu6PW5o7pdXr8aOgtFOEURJZYf1XAJs0IQ+gW+o1DzXjVkIoT+n1cm3N/t1KRJfX71MPg/ZUA==}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/esbuild-freebsd-arm64/0.13.12:
resolution: {integrity: sha512-F6LmI2Q1gii073kmBE3NOTt/6zLL5zvZsxNLF8PMAwdHc+iBhD1vzfI8uQZMJA1IgXa3ocr3L3DJH9fLGXy6Yw==}
cpu: [arm64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-32/0.13.12:
resolution: {integrity: sha512-U1UZwG3UIwF7/V4tCVAo/nkBV9ag5KJiJTt+gaCmLVWH3bPLX7y+fNlhIWZy8raTMnXhMKfaTvWZ9TtmXzvkuQ==}
cpu: [ia32]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-64/0.13.12:
resolution: {integrity: sha512-YpXSwtu2NxN3N4ifJxEdsgd6Q5d8LYqskrAwjmoCT6yQnEHJSF5uWcxv783HWN7lnGpJi9KUtDvYsnMdyGw71Q==}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-arm/0.13.12:
resolution: {integrity: sha512-SyiT/JKxU6J+DY2qUiSLZJqCAftIt3uoGejZ0HDnUM2MGJqEGSGh7p1ecVL2gna3PxS4P+j6WAehCwgkBPXNIw==}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-arm64/0.13.12:
resolution: {integrity: sha512-sgDNb8kb3BVodtAlcFGgwk+43KFCYjnFOaOfJibXnnIojNWuJHpL6aQJ4mumzNWw8Rt1xEtDQyuGK9f+Y24jGA==}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-mips64le/0.13.12:
resolution: {integrity: sha512-qQJHlZBG+QwVIA8AbTEtbvF084QgDi4DaUsUnA+EolY1bxrG+UyOuGflM2ZritGhfS/k7THFjJbjH2wIeoKA2g==}
cpu: [mips64el]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-linux-ppc64le/0.13.12:
resolution: {integrity: sha512-2dSnm1ldL7Lppwlo04CGQUpwNn5hGqXI38OzaoPOkRsBRWFBozyGxTFSee/zHFS+Pdh3b28JJbRK3owrrRgWNw==}
cpu: [ppc64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/esbuild-netbsd-64/0.13.12:
resolution: {integrity: sha512-D4raxr02dcRiQNbxOLzpqBzcJNFAdsDNxjUbKkDMZBkL54Z0vZh4LRndycdZAMcIdizC/l/Yp/ZsBdAFxc5nbA==}
cpu: [x64]
os: [netbsd]
requiresBuild: true
dev: true
optional: true
/esbuild-openbsd-64/0.13.12:
resolution: {integrity: sha512-KuLCmYMb2kh05QuPJ+va60bKIH5wHL8ypDkmpy47lzwmdxNsuySeCMHuTv5o2Af1RUn5KLO5ZxaZeq4GEY7DaQ==}
cpu: [x64]
os: [openbsd]
requiresBuild: true
dev: true
optional: true
/esbuild-sunos-64/0.13.12:
resolution: {integrity: sha512-jBsF+e0woK3miKI8ufGWKG3o3rY9DpHvCVRn5eburMIIE+2c+y3IZ1srsthKyKI6kkXLvV4Cf/E7w56kLipMXw==}
cpu: [x64]
os: [sunos]
requiresBuild: true
dev: true
optional: true
/esbuild-windows-32/0.13.12:
resolution: {integrity: sha512-L9m4lLFQrFeR7F+eLZXG82SbXZfUhyfu6CexZEil6vm+lc7GDCE0Q8DiNutkpzjv1+RAbIGVva9muItQ7HVTkQ==}
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/esbuild-windows-64/0.13.12:
resolution: {integrity: sha512-k4tX4uJlSbSkfs78W5d9+I9gpd+7N95W7H2bgOMFPsYREVJs31+Q2gLLHlsnlY95zBoPQMIzHooUIsixQIBjaQ==}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/esbuild-windows-arm64/0.13.12:
resolution: {integrity: sha512-2tTv/BpYRIvuwHpp2M960nG7uvL+d78LFW/ikPItO+2GfK51CswIKSetSpDii+cjz8e9iSPgs+BU4o8nWICBwQ==}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/esbuild/0.13.12:
resolution: {integrity: sha512-vTKKUt+yoz61U/BbrnmlG9XIjwpdIxmHB8DlPR0AAW6OdS+nBQBci6LUHU2q9WbBobMEIQxxDpKbkmOGYvxsow==}
hasBin: true
requiresBuild: true
optionalDependencies:
esbuild-android-arm64: 0.13.12
esbuild-darwin-64: 0.13.12
esbuild-darwin-arm64: 0.13.12
esbuild-freebsd-64: 0.13.12
esbuild-freebsd-arm64: 0.13.12
esbuild-linux-32: 0.13.12
esbuild-linux-64: 0.13.12
esbuild-linux-arm: 0.13.12
esbuild-linux-arm64: 0.13.12
esbuild-linux-mips64le: 0.13.12
esbuild-linux-ppc64le: 0.13.12
esbuild-netbsd-64: 0.13.12
esbuild-openbsd-64: 0.13.12
esbuild-sunos-64: 0.13.12
esbuild-windows-32: 0.13.12
esbuild-windows-64: 0.13.12
esbuild-windows-arm64: 0.13.12
dev: true
/escalade/3.1.1:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
engines: {node: '>=6'}
@@ -6433,6 +6812,10 @@ packages:
resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==}
dev: true
/estree-walker/2.0.2:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
dev: true
/esutils/2.0.3:
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
engines: {node: '>=0.10.0'}
@@ -8417,10 +8800,10 @@ packages:
ts-node:
optional: true
dependencies:
'@babel/core': 7.12.3
'@babel/core': 7.15.8
'@jest/test-sequencer': 26.6.3
'@jest/types': 26.6.2
babel-jest: 26.6.3_@[email protected]2.3
babel-jest: 26.6.3_@[email protected]5.8
chalk: 4.1.2
deepmerge: 4.2.2
glob: 7.2.0
@@ -11971,6 +12354,11 @@ packages:
resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
dev: true
/react-refresh/0.10.0:
resolution: {integrity: sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ==}
engines: {node: '>=0.10.0'}
dev: true
/react-refresh/0.8.3:
resolution: {integrity: sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==}
engines: {node: '>=0.10.0'}
@@ -12517,6 +12905,14 @@ packages:
acorn: 7.4.1
dev: true
/rollup/2.59.0:
resolution: {integrity: sha512-l7s90JQhCQ6JyZjKgo7Lq1dKh2RxatOM+Jr6a9F7WbS9WgKbocyUSeLmZl8evAse7y96Ae98L2k1cBOwWD8nHw==}
engines: {node: '>=10.0.0'}
hasBin: true
optionalDependencies:
fsevents: 2.3.2
dev: true
/rsvp/4.8.5:
resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==}
engines: {node: 6.* || >= 7.*}
@@ -14138,6 +14534,31 @@ packages:
extsprintf: 1.3.0
dev: true
/vite/[email protected]:
resolution: {integrity: sha512-+tGZ1OxozRirTudl4M3N3UTNJOlxdVo/qBl2IlDEy/ZpTFcskp+k5ncNjayR3bRYTCbqSOFz2JWGN1UmuDMScA==}
engines: {node: '>=12.2.0'}
hasBin: true
peerDependencies:
less: '*'
sass: '*'
stylus: '*'
peerDependenciesMeta:
less:
optional: true
sass:
optional: true
stylus:
optional: true
dependencies:
esbuild: 0.13.12
postcss: 8.3.9
resolve: 1.20.0
rollup: 2.59.0
sass: 1.42.1
optionalDependencies:
fsevents: 2.3.2
dev: true
/vm-browserify/1.1.2:
resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
dev: true
@@ -14299,12 +14720,6 @@ packages:
webpack: 4.44.2
dev: true
/webpack-merge/4.2.2:
resolution: {integrity: sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==}
dependencies:
lodash: 4.17.21
dev: true
/webpack-sources/1.4.3:
resolution: {integrity: sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==}
dependencies:

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 418 B

-7
View File
@@ -1,7 +0,0 @@
export function isNil(val: any) {
return val === null || val === undefined
}
export function isNotNil(val: any) {
return !isNil(val)
}
-1
View File
@@ -3,7 +3,6 @@ import { configure } from 'mobx'
import React from 'react'
import ReactDOM from 'react-dom'
import './assets/css/vs.css'
import './assets/icon/fonts/icon.css'
import { IndexPage } from './pages/manager'
configure({
enforceActions: 'never',
+13 -13
View File
@@ -1,4 +1,4 @@
import { proxy } from 'ajax-hook'
// import { proxy } from 'ajax-hook'
import localtunnel from 'localtunnel'
import { makeAutoObservable } from 'mobx'
import { openAlert } from 'src/components/alert'
@@ -14,18 +14,18 @@ declare global {
}
}
proxy({
onRequest: (config, handler) => {
if (config) config.headers['Bypass-Tunnel-Reminder'] = 'true'
handler.next(config)
},
onError: (err, handler) => {
handler.next(err)
},
onResponse: (response, handler) => {
handler.next(response)
},
})
// proxy({
// onRequest: (config, handler) => {
// if (config) config.headers['Bypass-Tunnel-Reminder'] = 'true'
// handler.next(config)
// },
// onError: (err, handler) => {
// handler.next(err)
// },
// onResponse: (response, handler) => {
// handler.next(response)
// },
// })
function getStorageID() {
return utools.getLocalId() + '_servers'
+25
View File
@@ -0,0 +1,25 @@
import react from '@vitejs/plugin-react'
import path from 'path'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
build: {
sourcemap: false,
outDir: 'build'
},
base: './',
plugins: [react()],
resolve: {
alias: [
{
find: 'src/',
replacement: path.resolve(__dirname, 'src') + '/',
},
{
find: /^~/,
replacement: '',
},
],
}
})