{"_id":"@belloai/bello-vue-auth","_rev":"11-2e7902886db83166f4265655c68c30a8","name":"@belloai/bello-vue-auth","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.1":{"name":"@belloai/bello-vue-auth","version":"0.0.1","main":"lib/auth.min.js","license":"ISC","scripts":{"build":"rollup --config"},"typings":"lib/index.d.ts","dependencies":{"vue-router":"^3.5.3"},"devDependencies":{"@rollup/plugin-typescript":"^8.2.1","rollup":"^2.45.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.1","typescript":"^4.3.4"},"repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git","directory":"packages/bello-tsconfig"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"peerDependencies":{"vue":"^2.6.11"},"homepage":"https://github.com/threfo/bello_frontend#readme","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"directories":{"lib":"lib","test":"__tests__"},"_id":"@belloai/bello-vue-auth@0.0.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Ndaqun5QdOYjb/UtTeJrxSHkCVAUUHjOpQZDKScm7+PnAjhDr7rdGljlvFMVjKQOYbTQHBIj0bTlcpq9LPrBJA==","shasum":"e365300baa2c460f34dd606a40b9a631292f7661","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.1.tgz","fileCount":7,"unpackedSize":13129,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+4iyDGrh/xlptfBiBSlNQVvuTJarGsYSQ62uc7eODEAiEA1+V+umEM3Y3wW8m9Gv1/dgiP3yZgdFfvBPfMJUx0LUY="}]},"_npmUser":{"name":"elysion72513","email":"liguangyuan@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.1_1635620793262_0.4612114039760311"},"_hasShrinkwrap":false},"0.0.2":{"name":"@belloai/bello-vue-auth","version":"0.0.2","main":"lib/auth.min.js","license":"ISC","scripts":{"build":"rollup --config"},"typings":"lib/index.d.ts","dependencies":{"vue-router":"^3.5.3"},"devDependencies":{"@rollup/plugin-typescript":"^8.2.1","rollup":"^2.45.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.1","typescript":"^4.3.4"},"repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git","directory":"packages/bello-tsconfig"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"peerDependencies":{"vue":"^2.6.11"},"homepage":"https://github.com/threfo/bello_frontend#readme","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"directories":{"lib":"lib","test":"__tests__"},"gitHead":"5b51e7ae00eac75c274520232345f8e9a0f5096a","_id":"@belloai/bello-vue-auth@0.0.2","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-xprIIIg5Oo6duKPktAJLMRehcu6CKHuz8xileStlZSqJRuefWp4V6SxW7aA65fAJGt9m3nmBYmn+vqNj/1348g==","shasum":"abe52a9ba1fc31ed1102ce874575c43a73670e68","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.2.tgz","fileCount":7,"unpackedSize":13186,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExXwJ2+zt30FST04BfULHbLPedH0bJL84/aB66KxkR4AiAB+t1kAydTEPD/CqYDKSEB5eWf1qx9/RQvyC9w/COp3w=="}]},"_npmUser":{"name":"thomas-ballo","email":"liurongliang@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.2_1635836262482_0.6960521344606097"},"_hasShrinkwrap":false},"0.0.3":{"name":"@belloai/bello-vue-auth","version":"0.0.3","main":"lib/auth.min.js","license":"ISC","scripts":{"build":"rollup --config"},"typings":"lib/index.d.ts","dependencies":{"vue-router":"^3.5.3"},"devDependencies":{"@rollup/plugin-typescript":"^8.2.1","rollup":"^2.45.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.1","typescript":"^4.3.4"},"repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git","directory":"packages/bello-tsconfig"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"peerDependencies":{"vue":"^2.6.11"},"homepage":"https://github.com/threfo/bello_frontend#readme","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"directories":{"lib":"lib","test":"__tests__"},"gitHead":"22bd1c2fa2ef5aa75ff1e2a836672b2d23b691e9","_id":"@belloai/bello-vue-auth@0.0.3","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-YZLKE/AZ3c6ih5B/b84Tk+i7WOfuTEfpzad1SsWoWiheYVyaTG6E6HAM0KVkCGyXG0BWr5jeyqXpQD7a1USTvw==","shasum":"1d4ab891f2e5133276be2ffcf44de3bd18c61ffa","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.3.tgz","fileCount":7,"unpackedSize":13965,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdahdlBTqq7ZxX8yqcJ8leu4I6kuS7So0zFNBfvdeAZAiB6Q0hpZGjuQr1983WXBdsYJ+blRpmVWxMAV4OLQhGNIg=="}]},"_npmUser":{"name":"elysion72513","email":"liguangyuan@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.3_1635842113795_0.6848090596032299"},"_hasShrinkwrap":false},"0.0.4":{"name":"@belloai/bello-vue-auth","version":"0.0.4","main":"lib/auth.min.js","license":"ISC","scripts":{"build":"rollup --config"},"typings":"lib/index.d.ts","devDependencies":{"@rollup/plugin-typescript":"^8.2.1","@belloai/bello-tsconfig":"^0.0.4","rollup":"^2.45.1","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-terser":"^7.0.2","tslib":"^2.3.1","typescript":"^4.3.4"},"repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git","directory":"packages/bello-vue-auth"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"peerDependencies":{"vue":"^2.6.11","vue-router":"^3.5.3"},"homepage":"https://github.com/threfo/bello_frontend#readme","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"directories":{"lib":"lib","test":"__tests__"},"gitHead":"22bd1c2fa2ef5aa75ff1e2a836672b2d23b691e9","_id":"@belloai/bello-vue-auth@0.0.4","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-vmpYQJqujnK89Flk4E+HenLZLx6NS7P/OkxMbwxd/gtGd7/+kyCJv/yBnACvlMLwwLRe/mrycTDilB5bohpKCg==","shasum":"f6c5fcc5dfbc4b8df362a2407b4ccff892fe0101","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.4.tgz","fileCount":7,"unpackedSize":14936,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmO4lcpf/NqMHTIjTCXYxfJp0WvQxtW2etK/4TXjQIjgIgJT54o04iHs9aTM3dwR9mmaWFYXDtQw8N7OxNnnpsjZI="}]},"_npmUser":{"name":"elysion72513","email":"liguangyuan@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.4_1636608178278_0.7258853213372554"},"_hasShrinkwrap":false},"0.0.5":{"name":"@belloai/bello-vue-auth","version":"0.0.5","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"homepage":"https://github.com/threfo/bello_frontend#readme","license":"ISC","publishConfig":{"access":"public"},"directories":{"lib":"lib","test":"__tests__"},"main":"lib/index.min.js","typings":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git","directory":"packages/bello-vue-auth"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"peerDependencies":{"vue":"^2.6.11","vue-router":"^3.5.3"},"scripts":{"build":"rollup --config","prepublishOnly":"yarn run build"},"gitHead":"53f32d61a1384e91472dd009874f058f2033d7c0","devDependencies":{"vue-router":"^3.5.3"},"_id":"@belloai/bello-vue-auth@0.0.5","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-Kp1k9JVs2Hz+BlyWyOBWwDF0OzR783pmK/g59a5lSAzK8iqzp1eMmqTjW8mCRIqKz1n/3aWxzhfRiwtic0ONbw==","shasum":"fb8746912c06c0f1260eed9aced857e3ffd6b8ea","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.5.tgz","fileCount":5,"unpackedSize":12365,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+AiTjjnEo2kwK+akMGKBmOYVLKMie7FFGhdmRNb14YAiBdwq08qSdM1exZEd1mLGlMG2DgSWVag51EtkzJLkzfpg=="}]},"_npmUser":{"name":"thomas-ballo","email":"liurongliang@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.5_1636784725081_0.1004290075276486"},"_hasShrinkwrap":false},"0.0.7":{"name":"@belloai/bello-vue-auth","version":"0.0.7","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"homepage":"https://github.com/threfo/bello_frontend#readme","license":"ISC","publishConfig":{"access":"public"},"directories":{"lib":"lib","test":"__tests__"},"module":"lib/index.esm.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git","directory":"packages/bello-vue-auth"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"peerDependencies":{"vue":"^2.6.11"},"scripts":{"build":"rimraf lib/* && rollup -c","watch":"rimraf lib/* && rollup -c -w","prepublishOnly":"yarn run build"},"gitHead":"3a4ee1b9e4e28ec91c73455addb07454e4c69fe0","_id":"@belloai/bello-vue-auth@0.0.7","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-6kshDOnqoCDdwSeA3/DgVlFQdM+K4rhMsA7f2ebmWq4s/UdGun+fsFLn3t94o7T00z8nTFXNrAjRWcBb2/oVSw==","shasum":"73557f24740db79f3eb5fadca04949e713584aed","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.7.tgz","fileCount":8,"unpackedSize":19149,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7aghUJ6WGi95LBu5NhGOVLm0Cd3x28f/pJ3SEQs8DeAiEAk2tBFvamZM1d8dO2LYKFOGGKFWpb1Apx4CGPdv4DYRM="}]},"_npmUser":{"name":"thomas-ballo","email":"liurongliang@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.7_1636796895063_0.35214552391348164"},"_hasShrinkwrap":false},"0.0.8":{"name":"@belloai/bello-vue-auth","version":"0.0.8","description":"vue 鉴权插件","author":{"name":"李广远","email":"liguangyuan@belloai.com"},"homepage":"https://github.com/threfo/bello_frontend#readme","license":"ISC","publishConfig":{"access":"public"},"directories":{"lib":"lib","test":"__tests__"},"module":"lib/index.esm.js","types":"lib/index.d.ts","main":"lib/index.common.js","unpkg":"lib/index.js","jsdelivr":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"scripts":{"build":"rimraf lib/* && rollup -c","watch":"rimraf lib/* && rollup -c -w","prepublishOnly":"yarn run build"},"devDependencies":{"vue":"^2.6.11"},"gitHead":"1b562824607b789e1d212a988e324cb88c31eca6","_id":"@belloai/bello-vue-auth@0.0.8","_nodeVersion":"14.15.5","_npmVersion":"lerna/3.22.1/node@v14.15.5+x64 (darwin)","dist":{"integrity":"sha512-GVduWtixhbm+cCL69nJT2nVb4l0NKVA5BhAmB+hf+x/CdKFJiErk/SpqVsLHQZCPbAsw5XuOjOWATCjxqo0egw==","shasum":"d55d026c38229108088a3fe27054de140e080ccf","tarball":"https://registry.npmjs.org/@belloai/bello-vue-auth/-/bello-vue-auth-0.0.8.tgz","fileCount":15,"unpackedSize":104600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvZWQCRA9TVsSAnZWagAA71gP/3rdvMl9lc3SIBCNMZXS\n7LiV4dX0V5WPv9j4S69k/vUZSbYaGSg9evcy7xGCm2ZDxDEy84q+w8FRCQtO\nPhA6H1kKsufpuHTZB594MBpZL1Fuwx97pczdnSvfVbIaj78Pd1MQdPjXL+hc\n2w3DSuvKNGoPH+vYanBq0P1HrVsTORW9Fdl0YqGuCIzGGmrwwnLlKoiMFeJP\nEUzRPfnxNH6htEuSyLALrgg9nQdJY2BgnTgRhmTTCdoU9/6jldR9dE+1xNpN\nzIr4LFm8tz85lQWbvzb5aepD5qiXmTs+e8dnNJeU3tRWM8JEmjUL4YDsKFNU\nq2JMFyKXCeBgV10f2kRRoenSXt/f8ZNd4PLzg7TbViYrlnxC168QrRPTLUct\nD5ighG5dLkGMI2c9wMrYq1Mfq5VjkB57yzHl5O6f5k74kXJOagyFWP9Br7RP\nXYyVm7ANz7GkSV0kmE0nsyQqPHm8hIawFQp2JXRGKd+TWMktqzw6eQ8ZE5WT\nHbd/S4Ta/R8vStWJBaLnOeQjmKdlUGkrpn55TSNh5hWR3AKAJmxxe6Q3hi0s\njXzNaBau7WvpzexQIYwLjRqIgyw70l6TunPQfFMY7UQkYsgX3Ufyzhq7rF7h\nBkapKrRFcc0w99ij3lOOfVM93mPBkj2uDSlUhTx3k0S2X4P/emAk7T8I7nDx\nG9/u\r\n=nh4O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICPDXJG7eYg7RPwRoO7aMA6jlyiU4XvfETIDlh6UyigTAiEA1ovaBPHh8Er7gwZY+77432+Tg2woyqV/AAS7yKgz9L0="}]},"_npmUser":{"name":"thomas-ballo","email":"liurongliang@belloai.com"},"maintainers":[{"name":"elysion72513","email":"liguangyuan@belloai.com"},{"name":"wanghuajin","email":"wanghuajin@belloai.com"},{"name":"thomas-ballo","email":"liurongliang@belloai.com"},{"name":"ouxiaohui","email":"627424435@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bello-vue-auth_0.0.8_1639814544532_0.3981259494455336"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-30T19:06:33.208Z","0.0.1":"2021-10-30T19:06:33.415Z","modified":"2024-04-03T09:35:08.511Z","0.0.2":"2021-11-02T06:57:42.874Z","0.0.3":"2021-11-02T08:35:13.946Z","0.0.4":"2021-11-11T05:22:58.439Z","0.0.5":"2021-11-13T06:25:25.247Z","0.0.7":"2021-11-13T09:48:15.287Z","0.0.8":"2021-12-18T08:02:24.705Z"},"maintainers":[{"email":"powan.li@foxmail.com","name":"powan"},{"email":"elysion72513@gmail.com","name":"elysion72513"},{"email":"liurongliang@belloai.com","name":"thomas-ballo"},{"email":"627424435@qq.com","name":"ouxiaohui"}],"description":"vue 鉴权插件","homepage":"https://github.com/threfo/bello_frontend#readme","repository":{"type":"git","url":"git+https://github.com/threfo/bello_frontend.git"},"author":{"name":"李广远","email":"liguangyuan@belloai.com"},"bugs":{"url":"https://github.com/threfo/bello_frontend/issues"},"license":"ISC","readme":"# `bello-vue-auth`\n\n```ts\n// src/router/index.ts\nimport Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport RouterUtil from '@belloai/router'\nimport Auth from '@belloai/auth'\n\nimport NProgress from 'nprogress' // progress bar\n\nimport LS from '@/utils/localStorage'\nimport routes from './routes'\n\nimport { loadLanguageAsync } from '@/i18n'\n\nVue.use(VueRouter)\nVue.use(Auth)\n\nconst router = new VueRouter({\n  mode: 'history',\n  base: process.env.BASE_URL,\n  routes\n})\n\nexport const auth = new Auth({\n  router\n})\n\nexport const routerUtil = new RouterUtil({\n  debug: false,\n  NProgress,\n  LS,\n  router,\n  auth,\n  canNoTokenPath: ['/'],\n  whenQueryHaveTokenFunc: async token => {\n    const { app } = router || {}\n    app.$store.commit('userModule/setToken', token)\n    await app.$store.dispatch('userModule/fetchUserInfo')\n  },\n  beforeEachFunc: async to => {\n    console.log('beforeEachFunc', JSON.stringify(to))\n    const { path, query } = to || {}\n    const { app } = router || {}\n    await app.$store.dispatch('configModule/getConfig', { path })\n    const { lang } = query || {}\n    if (lang) {\n      await loadLanguageAsync(lang)\n    }\n    return true\n  }\n})\n\nexport default router\n```\n","readmeFilename":"README.md"}