diff --git a/.eslintignore b/.eslintignore index d488c3443..cfddc62dd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,7 +7,6 @@ lib .vscode .idea /dist/ -/mock/ /public /docs .vscode diff --git a/build/plugins/index.ts b/build/plugins/index.ts index f78b23b0e..6f5d81d7e 100644 --- a/build/plugins/index.ts +++ b/build/plugins/index.ts @@ -3,7 +3,8 @@ import html from './html'; import iconify from './iconify'; import windicss from './windicss'; import visualizer from './visualizer'; +import mock from './mock'; -const plugins = [vue, ...html, ...iconify, windicss, visualizer]; +const plugins = [vue, ...html, ...iconify, windicss, visualizer, mock]; export default plugins; diff --git a/build/plugins/mock.ts b/build/plugins/mock.ts new file mode 100644 index 000000000..40d2e5854 --- /dev/null +++ b/build/plugins/mock.ts @@ -0,0 +1,9 @@ +import { viteMockServe } from 'vite-plugin-mock'; + +export default viteMockServe({ + mockPath: 'mock', + injectCode: ` + import { setupMockServer } from '../mock'; + setupMockServer(); + ` +}); diff --git a/build/plugins/visualizer.ts b/build/plugins/visualizer.ts index eeda22521..a250d5e78 100644 --- a/build/plugins/visualizer.ts +++ b/build/plugins/visualizer.ts @@ -1,7 +1,6 @@ import { visualizer } from 'rollup-plugin-visualizer'; export default visualizer({ - open: true, gzipSize: true, brotliSize: true }); diff --git a/mock/api/auth.ts b/mock/api/auth.ts new file mode 100644 index 000000000..25eea6b77 --- /dev/null +++ b/mock/api/auth.ts @@ -0,0 +1,16 @@ +import type { MockMethod } from 'vite-plugin-mock'; +import type { BackendServiceResult } from '@/interface'; + +export default [ + { + url: '/api/getUser', + method: 'get', + response: (): BackendServiceResult => { + return { + code: 200, + message: 'ok', + data: '测试mock数据' + }; + } + } +] as MockMethod[]; diff --git a/mock/api/index.ts b/mock/api/index.ts new file mode 100644 index 000000000..c709f0fa2 --- /dev/null +++ b/mock/api/index.ts @@ -0,0 +1,3 @@ +import auth from './auth'; + +export default [...auth]; diff --git a/mock/index.ts b/mock/index.ts new file mode 100644 index 000000000..9c264fd21 --- /dev/null +++ b/mock/index.ts @@ -0,0 +1,6 @@ +import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'; +import api from './api'; + +export function setupMockServer() { + createProdMockServer(api); +} diff --git a/package.json b/package.json index 7199b24c9..6ee17fa6d 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "eslint-plugin-vue": "^8.2.0", "husky": "^7.0.4", "lint-staged": "^12.1.3", + "mockjs": "^1.1.0", "patch-package": "^6.4.7", "postinstall-postinstall": "^2.1.0", "prettier": "^2.5.1", @@ -85,8 +86,9 @@ "typescript": "^4.5.4", "unplugin-icons": "^0.12.23", "unplugin-vue-components": "^0.17.9", - "vite": "~2.5.10", + "vite": "~2.5.10", "vite-plugin-html": "^2.1.1", + "vite-plugin-mock": "^2.9.6", "vite-plugin-windicss": "^1.6.1", "vue-tsc": "^0.30.0", "vueuc": "^0.4.18", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06a4be623..e24533d51 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,7 @@ specifiers: form-data: ^4.0.0 husky: ^7.0.4 lint-staged: ^12.1.3 + mockjs: ^1.1.0 naive-ui: ^2.23.1 patch-package: ^6.4.7 pinia: ^2.0.8 @@ -51,6 +52,7 @@ specifiers: vditor: ^3.8.10 vite: ~2.5.10 vite-plugin-html: ^2.1.1 + vite-plugin-mock: ^2.9.6 vite-plugin-windicss: ^1.6.1 vue: ^3.2.26 vue-router: ^4.0.12 @@ -107,6 +109,7 @@ devDependencies: eslint-plugin-vue: registry.npmmirror.com/eslint-plugin-vue/8.2.0_eslint@8.5.0 husky: registry.npmmirror.com/husky/7.0.4 lint-staged: registry.npmmirror.com/lint-staged/12.1.3 + mockjs: registry.npmmirror.com/mockjs/1.1.0 patch-package: registry.npmmirror.com/patch-package/6.4.7 postinstall-postinstall: registry.npmmirror.com/postinstall-postinstall/2.1.0 prettier: registry.npmmirror.com/prettier/2.5.1 @@ -117,6 +120,7 @@ devDependencies: unplugin-vue-components: registry.npmmirror.com/unplugin-vue-components/0.17.9_vite@2.5.10+vue@3.2.26 vite: registry.npmmirror.com/vite/2.5.10 vite-plugin-html: registry.npmmirror.com/vite-plugin-html/2.1.1_vite@2.5.10 + vite-plugin-mock: registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.5.10 vite-plugin-windicss: registry.npmmirror.com/vite-plugin-windicss/1.6.1_vite@2.5.10 vue-tsc: registry.npmmirror.com/vue-tsc/0.30.0_typescript@4.5.4 vueuc: registry.npmmirror.com/vueuc/0.4.18_vue@3.2.26 @@ -239,7 +243,7 @@ packages: dev: true registry.nlark.com/@nodelib/fs.scandir/2.1.5: - resolution: {integrity: sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz} + resolution: {integrity: sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz} name: '@nodelib/fs.scandir' version: 2.1.5 engines: {node: '>= 8'} @@ -249,14 +253,14 @@ packages: dev: true registry.nlark.com/@nodelib/fs.stat/2.0.5: - resolution: {integrity: sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz} + resolution: {integrity: sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz} name: '@nodelib/fs.stat' version: 2.0.5 engines: {node: '>= 8'} dev: true registry.nlark.com/@nodelib/fs.walk/1.2.8: - resolution: {integrity: sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz} + resolution: {integrity: sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz} name: '@nodelib/fs.walk' version: 1.2.8 engines: {node: '>= 8'} @@ -271,7 +275,7 @@ packages: version: 4.1.1 engines: {node: '>= 8.0.0'} dependencies: - estree-walker: registry.nlark.com/estree-walker/2.0.2 + estree-walker: registry.npmmirror.com/estree-walker/2.0.2 picomatch: registry.nlark.com/picomatch/2.3.0 dev: true @@ -388,7 +392,7 @@ packages: dev: true registry.nlark.com/ansi-styles/2.2.1: - resolution: {integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz} + resolution: {integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz} name: ansi-styles version: 2.2.1 engines: {node: '>=0.10.0'} @@ -400,7 +404,7 @@ packages: version: 3.2.1 engines: {node: '>=4'} dependencies: - color-convert: registry.nlark.com/color-convert/1.9.3 + color-convert: registry.npmmirror.com/color-convert/1.9.3 registry.nlark.com/ansi-styles/4.3.0: resolution: {integrity: sha1-7dgDYornHATIWuegkG7a00tkiTc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz} @@ -408,23 +412,23 @@ packages: version: 4.3.0 engines: {node: '>=8'} dependencies: - color-convert: registry.nlark.com/color-convert/2.0.1 + color-convert: registry.npmmirror.com/color-convert/2.0.1 registry.nlark.com/ansi-styles/5.2.0: - resolution: {integrity: sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-5.2.0.tgz} + resolution: {integrity: sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-5.2.0.tgz} name: ansi-styles version: 5.2.0 engines: {node: '>=10'} registry.nlark.com/ansi-styles/6.1.0: - resolution: {integrity: sha1-hzE8ECuBGKvVc3GvqzRhi/c1DtM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-6.1.0.tgz} + resolution: {integrity: sha1-hzE8ECuBGKvVc3GvqzRhi/c1DtM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ansi-styles/download/ansi-styles-6.1.0.tgz} name: ansi-styles version: 6.1.0 engines: {node: '>=12'} dev: true registry.nlark.com/anymatch/3.1.2: - resolution: {integrity: sha1-wFV8CWrzLxBhmPT04qODU343hxY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz} + resolution: {integrity: sha1-wFV8CWrzLxBhmPT04qODU343hxY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/anymatch/download/anymatch-3.1.2.tgz} name: anymatch version: 3.1.2 engines: {node: '>= 8'} @@ -505,7 +509,7 @@ packages: version: 1.0.2 registry.nlark.com/binary-extensions/2.2.0: - resolution: {integrity: sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/binary-extensions/download/binary-extensions-2.2.0.tgz} + resolution: {integrity: sha1-dfUC7q+f/eQvyYgpZFvk6na9ni0=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/binary-extensions/download/binary-extensions-2.2.0.tgz} name: binary-extensions version: 2.2.0 engines: {node: '>=8'} @@ -520,7 +524,7 @@ packages: concat-map: registry.nlark.com/concat-map/0.0.1 registry.nlark.com/braces/3.0.2: - resolution: {integrity: sha1-NFThpGLujVmeI23zNs2epPiv4Qc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/braces/download/braces-3.0.2.tgz} + resolution: {integrity: sha1-NFThpGLujVmeI23zNs2epPiv4Qc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/braces/download/braces-3.0.2.tgz} name: braces version: 3.0.2 engines: {node: '>=8'} @@ -534,6 +538,13 @@ packages: version: 1.1.2 dev: true + registry.nlark.com/builtin-modules/3.2.0: + resolution: {integrity: sha1-RdXbmefuXmvE82LgCL+RerUEmIc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/builtin-modules/download/builtin-modules-3.2.0.tgz} + name: builtin-modules + version: 3.2.0 + engines: {node: '>=6'} + dev: true + registry.nlark.com/builtins/4.0.0: resolution: {integrity: sha1-qDRUIN6CBo/cTWVZ0EVkA6j7GQU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/builtins/download/builtins-4.0.0.tgz} name: builtins @@ -644,21 +655,6 @@ packages: wrap-ansi: registry.nlark.com/wrap-ansi/7.0.0 dev: true - registry.nlark.com/color-convert/1.9.3: - resolution: {integrity: sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/color-convert/download/color-convert-1.9.3.tgz} - name: color-convert - version: 1.9.3 - dependencies: - color-name: registry.nlark.com/color-name/1.1.3 - - registry.nlark.com/color-convert/2.0.1: - resolution: {integrity: sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz} - name: color-convert - version: 2.0.1 - engines: {node: '>=7.0.0'} - dependencies: - color-name: registry.nlark.com/color-name/1.1.4 - registry.nlark.com/color-name/1.1.3: resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/color-name/download/color-name-1.1.3.tgz} name: color-name @@ -692,6 +688,18 @@ packages: name: concat-map version: 0.0.1 + registry.nlark.com/connect/3.7.0: + resolution: {integrity: sha1-XUk0iRDKpeB6AYALAw0MNfIEhPg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/connect/download/connect-3.7.0.tgz} + name: connect + version: 3.7.0 + engines: {node: '>= 0.10.0'} + dependencies: + debug: registry.npmmirror.com/debug/2.6.9 + finalhandler: registry.nlark.com/finalhandler/1.1.2 + parseurl: registry.nlark.com/parseurl/1.3.3 + utils-merge: registry.nlark.com/utils-merge/1.0.1 + dev: true + registry.nlark.com/constantinople/4.0.1: resolution: {integrity: sha1-De8RP6Dk3I3oMzGlz3nIsyUhMVE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/constantinople/download/constantinople-4.0.1.tgz} name: constantinople @@ -880,6 +888,13 @@ packages: version: 0.1.4 dev: true + registry.nlark.com/deepmerge/4.2.2: + resolution: {integrity: sha1-RNLqNnm49NT/ujPwPYZfwee/SVU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/deepmerge/download/deepmerge-4.2.2.tgz} + name: deepmerge + version: 4.2.2 + engines: {node: '>=0.10.0'} + dev: true + registry.nlark.com/define-properties/1.1.3: resolution: {integrity: sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/define-properties/download/define-properties-1.1.3.tgz} name: define-properties @@ -1039,6 +1054,19 @@ packages: version: 1.0.0 dev: true + registry.nlark.com/ee-first/1.1.1: + resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/ee-first/download/ee-first-1.1.1.tgz} + name: ee-first + version: 1.1.1 + dev: true + + registry.nlark.com/encodeurl/1.0.2: + resolution: {integrity: sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/encodeurl/download/encodeurl-1.0.2.tgz} + name: encodeurl + version: 1.0.2 + engines: {node: '>= 0.8'} + dev: true + registry.nlark.com/enquirer/2.3.6: resolution: {integrity: sha1-Kn/l3WNKHkElqXXsmU/1RW3Dc00=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/enquirer/download/enquirer-2.3.6.tgz} name: enquirer @@ -1115,6 +1143,12 @@ packages: engines: {node: '>=6'} dev: true + registry.nlark.com/escape-html/1.0.3: + resolution: {integrity: sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/escape-html/download/escape-html-1.0.3.tgz} + name: escape-html + version: 1.0.3 + dev: true + registry.nlark.com/escape-string-regexp/1.0.5: resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1631501921416&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz} name: escape-string-regexp @@ -1248,7 +1282,7 @@ packages: dev: true registry.nlark.com/fast-glob/3.2.7: - resolution: {integrity: sha1-/Wy3otfpqnp4RhEehaGW1rL3ZqE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fast-glob/download/fast-glob-3.2.7.tgz} + resolution: {integrity: sha1-/Wy3otfpqnp4RhEehaGW1rL3ZqE=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fast-glob/download/fast-glob-3.2.7.tgz?cache=0&sync_timestamp=1631501914879&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffast-glob%2Fdownload%2Ffast-glob-3.2.7.tgz} name: fast-glob version: 3.2.7 engines: {node: '>=8'} @@ -1273,11 +1307,11 @@ packages: dev: true registry.nlark.com/fastq/1.13.0: - resolution: {integrity: sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz} + resolution: {integrity: sha1-YWdg+Ip1Jr38WWt8q4wYk4w2uYw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fastq/download/fastq-1.13.0.tgz?cache=0&sync_timestamp=1631616062226&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffastq%2Fdownload%2Ffastq-1.13.0.tgz} name: fastq version: 1.13.0 dependencies: - reusify: registry.nlark.com/reusify/1.0.4 + reusify: registry.npmmirror.com/reusify/1.0.4 dev: true registry.nlark.com/fecha/4.2.1: @@ -1304,7 +1338,7 @@ packages: dev: true registry.nlark.com/fill-range/7.0.1: - resolution: {integrity: sha1-GRmmp8df44ssfHflGYU12prN2kA=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fill-range/download/fill-range-7.0.1.tgz} + resolution: {integrity: sha1-GRmmp8df44ssfHflGYU12prN2kA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/fill-range/download/fill-range-7.0.1.tgz} name: fill-range version: 7.0.1 engines: {node: '>=8'} @@ -1312,6 +1346,21 @@ packages: to-regex-range: registry.nlark.com/to-regex-range/5.0.1 dev: true + registry.nlark.com/finalhandler/1.1.2: + resolution: {integrity: sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/finalhandler/download/finalhandler-1.1.2.tgz} + name: finalhandler + version: 1.1.2 + engines: {node: '>= 0.8'} + dependencies: + debug: registry.npmmirror.com/debug/2.6.9 + encodeurl: registry.nlark.com/encodeurl/1.0.2 + escape-html: registry.nlark.com/escape-html/1.0.3 + on-finished: registry.nlark.com/on-finished/2.3.0 + parseurl: registry.nlark.com/parseurl/1.3.3 + statuses: registry.nlark.com/statuses/1.5.0 + unpipe: registry.nlark.com/unpipe/1.0.0 + dev: true + registry.nlark.com/find-config/1.0.0: resolution: {integrity: sha1-6vorm8B/qckOmgw++c7PHMgA9TA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/find-config/download/find-config-1.0.0.tgz} name: find-config @@ -1565,7 +1614,7 @@ packages: engines: {node: '>=4'} registry.nlark.com/has-flag/4.0.0: - resolution: {integrity: sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz} + resolution: {integrity: sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz} name: has-flag version: 4.0.0 engines: {node: '>=8'} @@ -1709,7 +1758,7 @@ packages: has-bigints: registry.nlark.com/has-bigints/1.0.1 registry.nlark.com/is-binary-path/2.1.0: - resolution: {integrity: sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-binary-path/download/is-binary-path-2.1.0.tgz} + resolution: {integrity: sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-binary-path/download/is-binary-path-2.1.0.tgz} name: is-binary-path version: 2.1.0 engines: {node: '>=8'} @@ -1794,7 +1843,7 @@ packages: has-tostringtag: registry.nlark.com/has-tostringtag/1.0.0 registry.nlark.com/is-number/7.0.0: - resolution: {integrity: sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-number/download/is-number-7.0.0.tgz} + resolution: {integrity: sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/is-number/download/is-number-7.0.0.tgz} name: is-number version: 7.0.0 engines: {node: '>=0.12.0'} @@ -2156,14 +2205,14 @@ packages: dev: true registry.nlark.com/merge2/1.4.1: - resolution: {integrity: sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/merge2/download/merge2-1.4.1.tgz} + resolution: {integrity: sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/merge2/download/merge2-1.4.1.tgz} name: merge2 version: 1.4.1 engines: {node: '>= 8'} dev: true registry.nlark.com/micromatch/4.0.4: - resolution: {integrity: sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/micromatch/download/micromatch-4.0.4.tgz} + resolution: {integrity: sha1-iW1Rnf6dsl/OlM63pQCRm/iB6/k=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/micromatch/download/micromatch-4.0.4.tgz} name: micromatch version: 4.0.4 engines: {node: '>=8.6'} @@ -2273,7 +2322,7 @@ packages: dev: true registry.nlark.com/normalize-path/3.0.0: - resolution: {integrity: sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/normalize-path/download/normalize-path-3.0.0.tgz?cache=0&sync_timestamp=1631501916645&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-path%2Fdownload%2Fnormalize-path-3.0.0.tgz} + resolution: {integrity: sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/normalize-path/download/normalize-path-3.0.0.tgz?cache=0&sync_timestamp=1631501916645&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-path%2Fdownload%2Fnormalize-path-3.0.0.tgz} name: normalize-path version: 3.0.0 engines: {node: '>=0.10.0'} @@ -2313,6 +2362,15 @@ packages: has-symbols: registry.npmmirror.com/has-symbols/1.0.2 object-keys: registry.nlark.com/object-keys/1.1.1 + registry.nlark.com/on-finished/2.3.0: + resolution: {integrity: sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/on-finished/download/on-finished-2.3.0.tgz} + name: on-finished + version: 2.3.0 + engines: {node: '>= 0.8'} + dependencies: + ee-first: registry.nlark.com/ee-first/1.1.1 + dev: true + registry.nlark.com/once/1.4.0: resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/once/download/once-1.4.0.tgz} name: once @@ -2436,6 +2494,13 @@ packages: engines: {node: '>=0.10.0'} dev: true + registry.nlark.com/parseurl/1.3.3: + resolution: {integrity: sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/parseurl/download/parseurl-1.3.3.tgz} + name: parseurl + version: 1.3.3 + engines: {node: '>= 0.8'} + dev: true + registry.nlark.com/pascal-case/3.1.2: resolution: {integrity: sha1-tI4O8rmOIF58Ha50fQsVCCN2YOs=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/pascal-case/download/pascal-case-3.1.2.tgz} name: pascal-case @@ -2479,10 +2544,16 @@ packages: engines: {node: '>=8'} registry.nlark.com/path-parse/1.0.7: - resolution: {integrity: sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-parse/download/path-parse-1.0.7.tgz} + resolution: {integrity: sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-parse/download/path-parse-1.0.7.tgz} name: path-parse version: 1.0.7 + registry.nlark.com/path-to-regexp/6.2.0: + resolution: {integrity: sha1-97OAMzYQTDRoia3s5hRmkjBkXzg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-to-regexp/download/path-to-regexp-6.2.0.tgz} + name: path-to-regexp + version: 6.2.0 + dev: true + registry.nlark.com/path-type/4.0.0: resolution: {integrity: sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/path-type/download/path-type-4.0.0.tgz} name: path-type @@ -2497,7 +2568,7 @@ packages: dev: false registry.nlark.com/picomatch/2.3.0: - resolution: {integrity: sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz} + resolution: {integrity: sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/picomatch/download/picomatch-2.3.0.tgz} name: picomatch version: 2.3.0 engines: {node: '>=8.6'} @@ -2664,7 +2735,7 @@ packages: dev: true registry.nlark.com/queue-microtask/1.2.3: - resolution: {integrity: sha1-SSkii7xyTfrEPg77BYyve2z7YkM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/queue-microtask/download/queue-microtask-1.2.3.tgz} + resolution: {integrity: sha1-SSkii7xyTfrEPg77BYyve2z7YkM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/queue-microtask/download/queue-microtask-1.2.3.tgz} name: queue-microtask version: 1.2.3 dev: true @@ -2693,7 +2764,7 @@ packages: dev: true registry.nlark.com/readdirp/3.6.0: - resolution: {integrity: sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz} + resolution: {integrity: sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/readdirp/download/readdirp-3.6.0.tgz} name: readdirp version: 3.6.0 engines: {node: '>=8.10.0'} @@ -2794,7 +2865,7 @@ packages: dev: true registry.nlark.com/resolve/1.20.0: - resolution: {integrity: sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/resolve/download/resolve-1.20.0.tgz} + resolution: {integrity: sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/resolve/download/resolve-1.20.0.tgz?cache=0&sync_timestamp=1631501917799&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fresolve%2Fdownload%2Fresolve-1.20.0.tgz} name: resolve version: 1.20.0 dependencies: @@ -2829,13 +2900,6 @@ packages: through: registry.nlark.com/through/2.3.8 dev: false - registry.nlark.com/reusify/1.0.4: - resolution: {integrity: sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/reusify/download/reusify-1.0.4.tgz} - name: reusify - version: 1.0.4 - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true - registry.nlark.com/rfdc/1.3.0: resolution: {integrity: sha1-0LfEQasnINBdxM8m4ByJYx2doIs=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/rfdc/download/rfdc-1.3.0.tgz} name: rfdc @@ -2892,7 +2956,7 @@ packages: dev: true registry.nlark.com/run-parallel/1.2.0: - resolution: {integrity: sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/run-parallel/download/run-parallel-1.2.0.tgz} + resolution: {integrity: sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/run-parallel/download/run-parallel-1.2.0.tgz} name: run-parallel version: 1.2.0 dependencies: @@ -3099,6 +3163,13 @@ packages: spdx-license-ids: registry.npmmirror.com/spdx-license-ids/3.0.11 dev: true + registry.nlark.com/statuses/1.5.0: + resolution: {integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/statuses/download/statuses-1.5.0.tgz} + name: statuses + version: 1.5.0 + engines: {node: '>= 0.6'} + dev: true + registry.nlark.com/string-argv/0.3.1: resolution: {integrity: sha1-leL77AQnrhkYSTX4FtdKqkxcGdo=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/string-argv/download/string-argv-0.3.1.tgz} name: string-argv @@ -3233,7 +3304,7 @@ packages: dev: true registry.nlark.com/to-regex-range/5.0.1: - resolution: {integrity: sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/to-regex-range/download/to-regex-range-5.0.1.tgz} + resolution: {integrity: sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/to-regex-range/download/to-regex-range-5.0.1.tgz} name: to-regex-range version: 5.0.1 engines: {node: '>=8.0'} @@ -3305,7 +3376,7 @@ packages: dev: false registry.nlark.com/uglify-to-browserify/1.0.2: - resolution: {integrity: sha1-bgkk1r2mta/jSeOabWMoUKD4grc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz} + resolution: {integrity: sha1-bgkk1r2mta/jSeOabWMoUKD4grc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz} name: uglify-to-browserify version: 1.0.2 requiresBuild: true @@ -3335,6 +3406,13 @@ packages: engines: {node: '>= 10.0.0'} dev: true + registry.nlark.com/unpipe/1.0.0: + resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/unpipe/download/unpipe-1.0.0.tgz} + name: unpipe + version: 1.0.0 + engines: {node: '>= 0.8'} + dev: true + registry.nlark.com/upath/2.0.1: resolution: {integrity: sha1-UMc96mjW9rmQ9R0nnOYIFmXWGos=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/upath/download/upath-2.0.1.tgz} name: upath @@ -3356,6 +3434,13 @@ packages: version: 1.0.2 dev: true + registry.nlark.com/utils-merge/1.0.1: + resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.nlark.com/utils-merge/download/utils-merge-1.0.1.tgz} + name: utils-merge + version: 1.0.1 + engines: {node: '>= 0.4.0'} + dev: true + registry.nlark.com/v8-compile-cache/2.3.0: resolution: {integrity: sha1-LeGWGMZtwkfc+2+ZM4A12CRaLO4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.nlark.com/v8-compile-cache/download/v8-compile-cache-2.3.0.tgz} name: v8-compile-cache @@ -4055,13 +4140,42 @@ packages: '@types/yargs': registry.npmmirror.com/@types/yargs/16.0.4 chalk: registry.npmmirror.com/chalk/4.1.2 + registry.npmmirror.com/@rollup/plugin-node-resolve/13.1.1: + resolution: {integrity: sha512-6QKtRevXLrmEig9UiMYt2fSvee9TyltGRfw+qSs6xjUnxwjOzTOqy+/Lpxsgjb8mJn1EQNbCDAvt89O4uzL5kw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@rollup/plugin-node-resolve/download/@rollup/plugin-node-resolve-13.1.1.tgz} + name: '@rollup/plugin-node-resolve' + version: 13.1.1 + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.42.0 + dependencies: + '@rollup/pluginutils': registry.npmmirror.com/@rollup/pluginutils/3.1.0 + '@types/resolve': registry.npmmirror.com/@types/resolve/1.17.1 + builtin-modules: registry.nlark.com/builtin-modules/3.2.0 + deepmerge: registry.nlark.com/deepmerge/4.2.2 + is-module: registry.npmmirror.com/is-module/1.0.0 + resolve: registry.nlark.com/resolve/1.20.0 + dev: true + + registry.npmmirror.com/@rollup/pluginutils/3.1.0: + resolution: {integrity: sha1-cGtFJO5tyLEDs8mVUz5a1oDAK5s=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@rollup/pluginutils/download/@rollup/pluginutils-3.1.0.tgz} + name: '@rollup/pluginutils' + version: 3.1.0 + engines: {node: '>= 8.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0 + dependencies: + '@types/estree': registry.npmmirror.com/@types/estree/0.0.39 + estree-walker: registry.npmmirror.com/estree-walker/1.0.1 + picomatch: registry.nlark.com/picomatch/2.3.0 + dev: true + registry.npmmirror.com/@rollup/pluginutils/4.1.1: resolution: {integrity: sha1-HU2obdTt7RVlalfZM/2iuaCNR+w=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@rollup/pluginutils/download/@rollup/pluginutils-4.1.1.tgz} name: '@rollup/pluginutils' version: 4.1.1 engines: {node: '>= 8.0.0'} dependencies: - estree-walker: registry.nlark.com/estree-walker/2.0.2 + estree-walker: registry.npmmirror.com/estree-walker/2.0.2 picomatch: registry.nlark.com/picomatch/2.3.0 dev: true @@ -4083,6 +4197,12 @@ packages: version: 2.0.1 dev: false + registry.npmmirror.com/@types/estree/0.0.39: + resolution: {integrity: sha1-4Xfmme4bjCLSMXTKqnQiZEOJUJ8=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/estree/download/@types/estree-0.0.39.tgz} + name: '@types/estree' + version: 0.0.39 + dev: true + registry.npmmirror.com/@types/istanbul-lib-coverage/2.0.3: resolution: {integrity: sha1-S6jdtyAiH0MuRDvV+RF/0iz9R2I=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/istanbul-lib-coverage/download/@types/istanbul-lib-coverage-2.0.3.tgz} name: '@types/istanbul-lib-coverage' @@ -4136,6 +4256,12 @@ packages: version: 1.2.2 dev: true + registry.npmmirror.com/@types/mockjs/1.0.4: + resolution: {integrity: sha1-5waVHV4ztPCku3Ox+LEk4m8IHeA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/mockjs/download/@types/mockjs-1.0.4.tgz} + name: '@types/mockjs' + version: 1.0.4 + dev: true + registry.npmmirror.com/@types/node/14.14.45: resolution: {integrity: sha1-7C37VWb/gU0GGu9+FBV1rtuiRc8=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/download/@types/node-14.14.45.tgz} name: '@types/node' @@ -4147,7 +4273,7 @@ packages: version: 14.18.0 registry.npmmirror.com/@types/node/16.11.12: - resolution: {integrity: sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/download/@types/node-16.11.12.tgz} + resolution: {integrity: sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/node/download/@types/node-16.11.12.tgz} name: '@types/node' version: 16.11.12 @@ -4169,6 +4295,14 @@ packages: version: 6.9.7 dev: true + registry.npmmirror.com/@types/resolve/1.17.1: + resolution: {integrity: sha1-Ov1q2JZ8d+Q3bFmKgt3Vj0bsRdY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/resolve/download/@types/resolve-1.17.1.tgz} + name: '@types/resolve' + version: 1.17.1 + dependencies: + '@types/node': registry.npmmirror.com/@types/node/16.11.12 + dev: true + registry.npmmirror.com/@types/throttle-debounce/2.1.0: resolution: {integrity: sha1-HD32JL/Eti+ZLTASuExW1B6rN3Y=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/throttle-debounce/download/@types/throttle-debounce-2.1.0.tgz} name: '@types/throttle-debounce' @@ -4713,7 +4847,7 @@ packages: dev: true registry.npmmirror.com/chalk/1.1.3: - resolution: {integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chalk/download/chalk-1.1.3.tgz} + resolution: {integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chalk/download/chalk-1.1.3.tgz} name: chalk version: 1.1.3 engines: {node: '>=0.10.0'} @@ -4736,7 +4870,7 @@ packages: supports-color: registry.npmmirror.com/supports-color/5.5.0 registry.npmmirror.com/chalk/4.1.2: - resolution: {integrity: sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chalk/download/chalk-4.1.2.tgz} + resolution: {integrity: sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chalk/download/chalk-4.1.2.tgz} name: chalk version: 4.1.2 engines: {node: '>=10'} @@ -4759,7 +4893,7 @@ packages: dev: true registry.npmmirror.com/chokidar/3.5.2: - resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chokidar/download/chokidar-3.5.2.tgz} + resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/chokidar/download/chokidar-3.5.2.tgz} name: chokidar version: 3.5.2 engines: {node: '>= 8.10.0'} @@ -4818,6 +4952,21 @@ packages: string-width: registry.npmmirror.com/string-width/5.0.1 dev: true + registry.npmmirror.com/color-convert/1.9.3: + resolution: {integrity: sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/color-convert/download/color-convert-1.9.3.tgz} + name: color-convert + version: 1.9.3 + dependencies: + color-name: registry.nlark.com/color-name/1.1.3 + + registry.npmmirror.com/color-convert/2.0.1: + resolution: {integrity: sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/color-convert/download/color-convert-2.0.1.tgz} + name: color-convert + version: 2.0.1 + engines: {node: '>=7.0.0'} + dependencies: + color-name: registry.nlark.com/color-name/1.1.4 + registry.npmmirror.com/colorette/2.0.16: resolution: {integrity: sha1-cTua+E/bAAE58EVGvUqT9ipQhdo=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/colorette/download/colorette-2.0.16.tgz?cache=0&sync_timestamp=1633673609067&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcolorette%2Fdownload%2Fcolorette-2.0.16.tgz} name: colorette @@ -4830,14 +4979,14 @@ packages: version: 2.20.3 registry.npmmirror.com/commander/4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/download/commander-4.1.1.tgz} + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/download/commander-4.1.1.tgz} name: commander version: 4.1.1 engines: {node: '>= 6'} dev: true registry.npmmirror.com/commander/8.3.0: - resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/download/commander-8.3.0.tgz} + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/commander/download/commander-8.3.0.tgz} name: commander version: 8.3.0 engines: {node: '>= 12'} @@ -4996,7 +5145,7 @@ packages: dev: false registry.npmmirror.com/debug/2.6.9: - resolution: {integrity: sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-2.6.9.tgz} + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-2.6.9.tgz} name: debug version: 2.6.9 dependencies: @@ -5004,7 +5153,7 @@ packages: dev: true registry.npmmirror.com/debug/3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-3.2.7.tgz} + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-3.2.7.tgz} name: debug version: 3.2.7 dependencies: @@ -5012,7 +5161,7 @@ packages: dev: true registry.npmmirror.com/debug/4.3.3: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz} + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz} name: debug version: 4.3.3 engines: {node: '>=6.0'} @@ -5026,7 +5175,7 @@ packages: dev: true registry.npmmirror.com/debug/4.3.3_supports-color@9.2.1: - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz} + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/debug/download/debug-4.3.3.tgz} id: registry.npmmirror.com/debug/4.3.3 name: debug version: 4.3.3 @@ -5149,6 +5298,14 @@ packages: string.prototype.trimstart: registry.nlark.com/string.prototype.trimstart/1.0.4 unbox-primitive: registry.nlark.com/unbox-primitive/1.0.1 + registry.npmmirror.com/esbuild/0.11.3: + resolution: {integrity: sha1-tXFluQe+T/umUfZFBTjOjYwdXrA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild/download/esbuild-0.11.3.tgz} + name: esbuild + version: 0.11.3 + hasBin: true + requiresBuild: true + dev: true + registry.npmmirror.com/esbuild/0.12.29: resolution: {integrity: sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild/download/esbuild-0.12.29.tgz} name: esbuild @@ -5379,6 +5536,18 @@ packages: engines: {node: '>=4.0'} dev: true + registry.npmmirror.com/estree-walker/1.0.1: + resolution: {integrity: sha1-MbxdYSyWtwQQa0d+bdXYqhOMtwA=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/estree-walker/download/estree-walker-1.0.1.tgz} + name: estree-walker + version: 1.0.1 + dev: true + + registry.npmmirror.com/estree-walker/2.0.2: + resolution: {integrity: sha1-UvAQF4wqTBF6d1fP6UKtt9LaTKw=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/estree-walker/download/estree-walker-2.0.2.tgz} + name: estree-walker + version: 2.0.2 + dev: true + registry.npmmirror.com/ev-emitter/1.1.1: resolution: {integrity: sha1-jxiwzlx2pdGAF/ccCnlcZbkTjyo=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ev-emitter/download/ev-emitter-1.1.1.tgz} name: ev-emitter @@ -5492,7 +5661,7 @@ packages: dev: false registry.npmmirror.com/fsevents/2.3.2: - resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/download/fsevents-2.3.2.tgz} + resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/download/fsevents-2.3.2.tgz} name: fsevents version: 2.3.2 engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -5523,7 +5692,7 @@ packages: dev: false registry.npmmirror.com/glob-parent/5.1.2: - resolution: {integrity: sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/glob-parent/download/glob-parent-5.1.2.tgz} + resolution: {integrity: sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/glob-parent/download/glob-parent-5.1.2.tgz} name: glob-parent version: 5.1.2 engines: {node: '>= 6'} @@ -5728,6 +5897,12 @@ packages: is-extglob: registry.nlark.com/is-extglob/2.1.1 dev: true + registry.npmmirror.com/is-module/1.0.0: + resolution: {integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-module/download/is-module-1.0.0.tgz} + name: is-module + version: 1.0.0 + dev: true + registry.npmmirror.com/is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/is-negative-zero/download/is-negative-zero-2.0.2.tgz} name: is-negative-zero @@ -5934,20 +6109,29 @@ packages: import-meta-resolve: registry.npmmirror.com/import-meta-resolve/1.1.1 dev: true + registry.npmmirror.com/mockjs/1.1.0: + resolution: {integrity: sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/mockjs/download/mockjs-1.1.0.tgz} + name: mockjs + version: 1.1.0 + hasBin: true + dependencies: + commander: registry.npmmirror.com/commander/8.3.0 + dev: true + registry.npmmirror.com/ms/2.0.0: - resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/download/ms-2.0.0.tgz} + resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/download/ms-2.0.0.tgz} name: ms version: 2.0.0 dev: true registry.npmmirror.com/ms/2.1.2: - resolution: {integrity: sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz} + resolution: {integrity: sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz} name: ms version: 2.1.2 dev: true registry.npmmirror.com/ms/2.1.3: - resolution: {integrity: sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/download/ms-2.1.3.tgz} + resolution: {integrity: sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/ms/download/ms-2.1.3.tgz} name: ms version: 2.1.3 dev: true @@ -6222,6 +6406,13 @@ packages: version: 0.5.5 dev: true + registry.npmmirror.com/reusify/1.0.4: + resolution: {integrity: sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/reusify/download/reusify-1.0.4.tgz} + name: reusify + version: 1.0.4 + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + registry.npmmirror.com/rimraf/3.0.2: resolution: {integrity: sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/rimraf/download/rimraf-3.0.2.tgz} name: rimraf @@ -6432,7 +6623,7 @@ packages: dev: true registry.npmmirror.com/supports-color/2.0.0: - resolution: {integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/supports-color/download/supports-color-2.0.0.tgz} + resolution: {integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/supports-color/download/supports-color-2.0.0.tgz} name: supports-color version: 2.0.0 engines: {node: '>=0.8.0'} @@ -6447,7 +6638,7 @@ packages: has-flag: registry.nlark.com/has-flag/3.0.0 registry.npmmirror.com/supports-color/7.2.0: - resolution: {integrity: sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz} + resolution: {integrity: sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz} name: supports-color version: 7.2.0 engines: {node: '>=8'} @@ -6739,6 +6930,32 @@ packages: vite: registry.npmmirror.com/vite/2.5.10 dev: true + registry.npmmirror.com/vite-plugin-mock/2.9.6_mockjs@1.1.0+vite@2.5.10: + resolution: {integrity: sha1-BN0j3muqBS+qW5rTF1FMkNYgXiU=, registry: http://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-mock/download/vite-plugin-mock-2.9.6.tgz} + id: registry.npmmirror.com/vite-plugin-mock/2.9.6 + name: vite-plugin-mock + version: 2.9.6 + engines: {node: '>=12.0.0'} + peerDependencies: + mockjs: '>=1.1.0' + vite: '>=2.0.0' + dependencies: + '@rollup/plugin-node-resolve': registry.npmmirror.com/@rollup/plugin-node-resolve/13.1.1 + '@types/mockjs': registry.npmmirror.com/@types/mockjs/1.0.4 + chalk: registry.npmmirror.com/chalk/4.1.2 + chokidar: registry.npmmirror.com/chokidar/3.5.2 + connect: registry.nlark.com/connect/3.7.0 + debug: registry.npmmirror.com/debug/4.3.3 + esbuild: registry.npmmirror.com/esbuild/0.11.3 + fast-glob: registry.nlark.com/fast-glob/3.2.7 + mockjs: registry.npmmirror.com/mockjs/1.1.0 + path-to-regexp: registry.nlark.com/path-to-regexp/6.2.0 + vite: registry.npmmirror.com/vite/2.5.10 + transitivePeerDependencies: + - rollup + - supports-color + dev: true + registry.npmmirror.com/vite-plugin-windicss/1.6.1_vite@2.5.10: resolution: {integrity: sha512-63uv4HqBxtSZB0WOtrZS8yhyfQPgGQwYgcBald+/BpLSlYJREcDKgX9Xd/qDgTAjpDRozxKQj/JWreIlyIahGg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vite-plugin-windicss/download/vite-plugin-windicss-1.6.1.tgz} id: registry.npmmirror.com/vite-plugin-windicss/1.6.1 diff --git a/src/App.vue b/src/App.vue index 404125a8b..57d037fcb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,9 @@ diff --git a/src/composables/business/login.ts b/src/composables/business/login.ts index 8c091b016..8b660de6b 100644 --- a/src/composables/business/login.ts +++ b/src/composables/business/login.ts @@ -1,6 +1,6 @@ import { useAuthStore } from '@/store'; import { useLoading } from '@/hooks'; -import { setToken, setRefreshToken, setUserInfo, log } from '@/utils'; +import { setToken, setRefreshToken, setUserInfo, consoleLog } from '@/utils'; import type { LoginToken, UserInfo } from '@/interface'; import { useRouterPush, useRouteQuery } from '../common'; @@ -20,7 +20,7 @@ export function useLogin() { * @returns 是否登录成功 */ async function login(param: { phone: string; pwdOrCode: string; type: 'pwd' | 'sms' }) { - log(param); // 打印参数(接入接口后去除) + consoleLog(param); // 打印参数(接入接口后去除) startLoading(); // 1.这里调用登录接口获取token和refreshToken diff --git a/src/service/api/auth.ts b/src/service/api/auth.ts index e69de29bb..c0da5e4b4 100644 --- a/src/service/api/auth.ts +++ b/src/service/api/auth.ts @@ -0,0 +1,8 @@ +import { consoleLog } from '@/utils'; +import { mockRequest } from '../request'; + +/** 测试mock数据 */ +export async function fetchTestMock() { + const { data } = await mockRequest.get('/api/getUser'); + consoleLog('data: ', data); +} diff --git a/src/service/api/index.ts b/src/service/api/index.ts index 689b5cbca..34122eac5 100644 --- a/src/service/api/index.ts +++ b/src/service/api/index.ts @@ -1 +1,2 @@ export * from './demo'; +export * from './auth'; diff --git a/src/service/request/index.ts b/src/service/request/index.ts index 024cec725..c8f64e785 100644 --- a/src/service/request/index.ts +++ b/src/service/request/index.ts @@ -5,3 +5,8 @@ export const request = createRequest({ baseURL: import.meta.env.VITE_HTTP_URL, timeout: REQUEST_TIMEOUT }); + +export const mockRequest = createRequest({ + baseURL: '', + timeout: REQUEST_TIMEOUT +}); diff --git a/src/utils/common/console.ts b/src/utils/common/console.ts new file mode 100644 index 000000000..df38a75ca --- /dev/null +++ b/src/utils/common/console.ts @@ -0,0 +1,16 @@ +/* eslint-disable no-console */ + +/** 打印log */ +export function consoleLog(message?: any, ...optionalParams: any[]) { + console.log(message, ...optionalParams); +} + +/** 打印警告 */ +export function consoleWarn(message?: any, ...optionalParams: any[]) { + console.warn(message, ...optionalParams); +} + +/** 打印错误 */ +export function consoleError(message?: any, ...optionalParams: any[]) { + console.error(message, ...optionalParams); +} diff --git a/src/utils/common/index.ts b/src/utils/common/index.ts index 52230ffa6..12f69ec0a 100644 --- a/src/utils/common/index.ts +++ b/src/utils/common/index.ts @@ -2,5 +2,5 @@ export * from './typeof'; export * from './color'; export * from './icon'; export * from './browser'; -export * from './log'; +export * from './console'; export * from './number'; diff --git a/src/utils/common/log.ts b/src/utils/common/log.ts deleted file mode 100644 index b9f50ecf0..000000000 --- a/src/utils/common/log.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** 打印log */ -export function log(data: any) { - // eslint-disable-next-line no-console - console.log(data); -} diff --git a/tsconfig.json b/tsconfig.json index 5141005d0..1bf19f3ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,6 @@ "esModuleInterop": true, "lib": ["esnext", "dom"] }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "./**/*.ts"], + "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "./**/*.ts", "mock/**/*.ts"], "exclude": ["/dist/**", "node_modules"] }