From f57eb944edfd967f5f45566ec5bedbf12f147492 Mon Sep 17 00:00:00 2001 From: Vben Date: Sat, 27 Feb 2021 19:55:30 +0800 Subject: [PATCH] perf: improve persistent logic --- .env | 2 +- .github/workflows/release.yml | 2 +- .vscode/extensions.json | 2 +- package.json | 10 +- src/enums/cacheEnum.ts | 8 +- src/logics/initAppConfig.ts | 4 +- src/settings/designSetting.ts | 1 + src/store/modules/app.ts | 9 +- src/store/modules/lock.ts | 8 +- src/store/modules/user.ts | 25 ++--- src/utils/cache/index.ts | 22 ++-- src/utils/cache/memory.ts | 98 ++++++++++++++++++ src/utils/cache/persistent.ts | 183 +++++++++++++++------------------- yarn.lock | 135 ++++++++++++------------- 14 files changed, 295 insertions(+), 214 deletions(-) create mode 100644 src/utils/cache/memory.ts diff --git a/.env b/.env index fdd62d5cc18..b1a9ec8b4bc 100644 --- a/.env +++ b/.env @@ -5,4 +5,4 @@ VITE_PORT = 3100 VITE_GLOB_APP_TITLE = Vben Admin # spa shortname -VITE_GLOB_APP_SHORT_NAME = vue_vben_admin_2x +VITE_GLOB_APP_SHORT_NAME = vue_vben_admin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a36a9a3c82..74ab4a3d1c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: id: release_tag uses: yyx990803/release-tag@master env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.OPER_TOKEN }} with: tag_name: ${{ github.ref }} body: | diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d5b9ad94477..0af47dea9b2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,7 +5,7 @@ "stylelint.vscode-stylelint", "esbenp.prettier-vscode", "mrmlnc.vscode-less", - "antfu.i18n-ally", + "lokalise.i18n-ally", "antfu.iconify", "mikestead.dotenv", "heybourn.headwind" diff --git a/package.json b/package.json index 888aae6996b..015f587538f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@iconify/iconify": "^2.0.0-rc.6", - "@vueuse/core": "^4.2.2", + "@vueuse/core": "^4.3.0", "@zxcvbn-ts/core": "^0.2.0", "ant-design-vue": "2.0.0", "apexcharts": "^3.25.0", @@ -41,7 +41,7 @@ "sortablejs": "^1.13.0", "vditor": "^3.8.1", "vue": "3.0.5", - "vue-i18n": "9.0.0-rc.8", + "vue-i18n": "^9.0.0", "vue-router": "^4.0.4", "vue-types": "^3.0.2", "vuex": "^4.0.0", @@ -68,7 +68,7 @@ "@typescript-eslint/eslint-plugin": "^4.15.2", "@typescript-eslint/parser": "^4.15.2", "@vitejs/plugin-legacy": "^1.3.1", - "@vitejs/plugin-vue": "^1.1.4", + "@vitejs/plugin-vue": "^1.1.5", "@vitejs/plugin-vue-jsx": "^1.1.2", "@vue/compiler-sfc": "3.0.5", "autoprefixer": "^10.2.4", @@ -97,7 +97,7 @@ "stylelint-order": "^4.1.0", "ts-node": "^9.1.1", "typescript": "4.1.5", - "vite": "2.0.3", + "vite": "2.0.4", "vite-plugin-compression": "^0.2.2", "vite-plugin-html": "^2.0.2", "vite-plugin-imagemin": "^0.2.8", @@ -106,7 +106,7 @@ "vite-plugin-pwa": "^0.5.5", "vite-plugin-style-import": "^0.7.5", "vite-plugin-theme": "^0.4.8", - "vite-plugin-windicss": "0.5.3", + "vite-plugin-windicss": "0.5.4", "vue-eslint-parser": "^7.5.0", "yargs": "^16.2.0" }, diff --git a/src/enums/cacheEnum.ts b/src/enums/cacheEnum.ts index 4e6f43ec528..4b465e23153 100644 --- a/src/enums/cacheEnum.ts +++ b/src/enums/cacheEnum.ts @@ -1,5 +1,5 @@ // token key -export const TOKEN_KEY = 'TOKEN'; +export const TOKEN_KEY = 'TOKEN__'; // user info key export const USER_INFO_KEY = 'USER__INFO__'; @@ -19,6 +19,12 @@ export const BASE_LOCAL_CACHE_KEY = 'LOCAL__CACHE__KEY__'; // base global session key export const BASE_SESSION_CACHE_KEY = 'SESSION__CACHE__KEY__'; +// base global local key +export const APP_LOCAL_CACHE_KEY = 'LOCAL__CACHE__KEY__'; + +// base global session key +export const APP_SESSION_CACHE_KEY = 'SESSION__CACHE__KEY__'; + export enum CacheTypeEnum { SESSION, LOCAL, diff --git a/src/logics/initAppConfig.ts b/src/logics/initAppConfig.ts index 8e0f034e18e..c3a7d331c2e 100644 --- a/src/logics/initAppConfig.ts +++ b/src/logics/initAppConfig.ts @@ -7,7 +7,7 @@ import type { ProjectConfig } from '/#/config'; import { PROJ_CFG_KEY } from '/@/enums/cacheEnum'; import projectSetting from '/@/settings/projectSetting'; -import { getLocal } from '/@/utils/cache/persistent'; +import { Persistent } from '/@/utils/cache/persistent'; import { updateHeaderBgColor, updateSidebarBgColor } from '/@/logics/theme/updateBackground'; import { updateColorWeak } from '/@/logics/theme/updateColorWeak'; import { updateGrayMode } from '/@/logics/theme/updateGrayMode'; @@ -19,7 +19,7 @@ import { primaryColor } from '../../build/config/themeConfig'; // Initial project configuration export function initAppConfigStore() { - let projCfg: ProjectConfig = getLocal(PROJ_CFG_KEY) as ProjectConfig; + let projCfg: ProjectConfig = Persistent.getLocal(PROJ_CFG_KEY) as ProjectConfig; projCfg = deepMerge(projectSetting, projCfg || {}); try { const { diff --git a/src/settings/designSetting.ts b/src/settings/designSetting.ts index 868610abef5..e354d9064ed 100644 --- a/src/settings/designSetting.ts +++ b/src/settings/designSetting.ts @@ -4,6 +4,7 @@ export default { // app theme preset color export const APP_PRESET_COLOR_LIST: string[] = [ + '#0960bd', '#0084f4', '#009688', '#536dfe', diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts index ef012e6fb7e..7e7cc98161b 100644 --- a/src/store/modules/app.ts +++ b/src/store/modules/app.ts @@ -6,7 +6,7 @@ import store from '/@/store'; import { PROJ_CFG_KEY } from '/@/enums/cacheEnum'; import { hotModuleUnregisterModule } from '/@/utils/helper/vuexHelper'; -import { setLocal, getLocal, clearSession, clearLocal } from '/@/utils/cache/persistent'; +import { Persistent } from '/@/utils/cache/persistent'; import { deepMerge } from '/@/utils'; import { resetRouter } from '/@/router'; @@ -29,7 +29,7 @@ export default class App extends VuexModule { private pageLoadingState = false; // project config - private projectConfigState: ProjectConfig | null = getLocal(PROJ_CFG_KEY); + private projectConfigState: ProjectConfig | null = Persistent.getLocal(PROJ_CFG_KEY); // set main overflow hidden private lockMainScrollState = false; @@ -59,14 +59,13 @@ export default class App extends VuexModule { @Mutation commitProjectConfigState(proCfg: DeepPartial): void { this.projectConfigState = deepMerge(this.projectConfigState || {}, proCfg); - setLocal(PROJ_CFG_KEY, this.projectConfigState); + Persistent.setLocal(PROJ_CFG_KEY, this.projectConfigState); } @Action async resumeAllState() { resetRouter(); - clearSession(); - clearLocal(); + Persistent.clearAll(); permissionStore.commitResetState(); tabStore.commitResetState(); diff --git a/src/store/modules/lock.ts b/src/store/modules/lock.ts index 74c37ec3867..4dc172c00df 100644 --- a/src/store/modules/lock.ts +++ b/src/store/modules/lock.ts @@ -4,7 +4,7 @@ import store from '/@/store'; import { LOCK_INFO_KEY } from '/@/enums/cacheEnum'; import { hotModuleUnregisterModule } from '/@/utils/helper/vuexHelper'; -import { setLocal, getLocal, removeLocal } from '/@/utils/cache/persistent'; +import { Persistent } from '/@/utils/cache/persistent'; import { userStore } from './user'; @@ -18,7 +18,7 @@ hotModuleUnregisterModule(NAME); @Module({ dynamic: true, namespaced: true, store, name: NAME }) class Lock extends VuexModule { // lock info - private lockInfoState: LockInfo | null = getLocal(LOCK_INFO_KEY); + private lockInfoState: LockInfo | null = Persistent.getLocal(LOCK_INFO_KEY); get getLockInfo(): LockInfo { return this.lockInfoState || ({} as LockInfo); @@ -27,12 +27,12 @@ class Lock extends VuexModule { @Mutation commitLockInfoState(info: LockInfo): void { this.lockInfoState = Object.assign({}, this.lockInfoState, info); - setLocal(LOCK_INFO_KEY, this.lockInfoState); + Persistent.setLocal(LOCK_INFO_KEY, this.lockInfoState); } @Mutation resetLockInfo(): void { - removeLocal(LOCK_INFO_KEY); + Persistent.removeLocal(LOCK_INFO_KEY); this.lockInfoState = null; } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 579f839287f..f7698d167d5 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -18,30 +18,23 @@ import router from '/@/router'; import { loginApi, getUserInfoById } from '/@/api/sys/user'; -import { setLocal, getLocal, getSession, setSession } from '/@/utils/cache/persistent'; -import { useProjectSetting } from '/@/hooks/setting'; +import { Persistent, BasicKeys } from '/@/utils/cache/persistent'; import { useI18n } from '/@/hooks/web/useI18n'; import { ErrorMessageMode } from '/@/utils/http/axios/types'; +import projectSetting from '/@/settings/projectSetting'; export type UserInfo = Omit; const NAME = 'user'; hotModuleUnregisterModule(NAME); -const { permissionCacheType } = useProjectSetting(); - -function getCache(key: string) { - const fn = permissionCacheType === CacheTypeEnum.LOCAL ? getLocal : getSession; +function getCache(key: BasicKeys) { + const { permissionCacheType } = projectSetting; + const fn = + permissionCacheType === CacheTypeEnum.LOCAL ? Persistent.getLocal : Persistent.getSession; return fn(key) as T; } -function setCache(USER_INFO_KEY: string, info: any) { - if (!info) return; - setLocal(USER_INFO_KEY, info, true); - // TODO - setSession(USER_INFO_KEY, info, true); -} - @Module({ namespaced: true, name: NAME, dynamic: true, store }) class User extends VuexModule { // user info @@ -75,19 +68,19 @@ class User extends VuexModule { @Mutation commitUserInfoState(info: UserInfo): void { this.userInfoState = info; - setCache(USER_INFO_KEY, info); + Persistent.setLocal(USER_INFO_KEY, info); } @Mutation commitRoleListState(roleList: RoleEnum[]): void { this.roleListState = roleList; - setCache(ROLES_KEY, roleList); + Persistent.setLocal(ROLES_KEY, roleList); } @Mutation commitTokenState(info: string): void { this.tokenState = info; - setCache(TOKEN_KEY, info); + Persistent.setLocal(TOKEN_KEY, info); } /** diff --git a/src/utils/cache/index.ts b/src/utils/cache/index.ts index 0eedcc985e9..6feb5f119eb 100644 --- a/src/utils/cache/index.ts +++ b/src/utils/cache/index.ts @@ -1,22 +1,32 @@ import { getStorageShortName } from '/@/utils/env'; -import { createStorage as create } from './storageCache'; +import { createStorage as create, CreateStorageParams } from './storageCache'; import { enableStorageEncryption } from '/@/settings/encryptionSetting'; import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting'; -const createOptions = (storage = sessionStorage) => { +export type Options = Partial; + +const createOptions = (storage: Storage, options: Options = {}): Options => { return { // No encryption in debug mode hasEncrypt: enableStorageEncryption, storage, prefixKey: getStorageShortName(), - timeout: DEFAULT_CACHE_TIME, + + ...options, }; }; -export const WebStorage = create(createOptions()); +export const WebStorage = create(createOptions(sessionStorage)); + +export const createStorage = (storage: Storage = sessionStorage, options: Options = {}) => { + return create(createOptions(storage, options)); +}; -export const createStorage = (storage: Storage = sessionStorage) => { - return create(createOptions(storage))!; +export const createPersistentStorage = ( + storage: Storage = sessionStorage, + options: Options = {} +) => { + return createStorage(storage, { ...options, timeout: DEFAULT_CACHE_TIME }); }; export default WebStorage; diff --git a/src/utils/cache/memory.ts b/src/utils/cache/memory.ts new file mode 100644 index 00000000000..08a9a36047d --- /dev/null +++ b/src/utils/cache/memory.ts @@ -0,0 +1,98 @@ +export interface Cache { + value?: V; + timeoutId?: ReturnType; + time?: number; + alive?: number; +} + +const NOT_ALIVE = 0; + +export class Memory { + private cache: { [key in keyof T]?: Cache } = {}; + private alive: number; + + constructor(alive = NOT_ALIVE) { + // Unit second + this.alive = alive * 1000; + } + + get getCache() { + return this.cache; + } + + setCache(cache) { + this.cache = cache; + } + + // get(key: K) { + // const item = this.getItem(key); + // const time = item?.time; + // if (!isNullOrUnDef(time) && time < new Date().getTime()) { + // this.remove(key); + // } + // return item?.value ?? undefined; + // } + + get(key: K) { + return this.cache[key]; + } + + set(key: K, value: V, expires?: number) { + let item = this.get(key); + + if (!expires || (expires as number) <= 0) { + expires = this.alive; + } + if (item) { + if (item.timeoutId) { + clearTimeout(item.timeoutId); + item.timeoutId = undefined; + } + item.value = value; + } else { + item = { value, alive: expires }; + this.cache[key] = item; + } + + if (!expires) { + return value; + } + item.time = new Date().getTime() + this.alive * 1000; + item.timeoutId = setTimeout(() => { + this.remove(key); + }, expires); + + return value; + } + + remove(key: K) { + const item = this.get(key); + Reflect.deleteProperty(this.cache, key); + if (item) { + clearTimeout(item.timeoutId!); + return item.value; + } + } + + resetCache(cache: { [K in keyof T]: Cache }) { + Object.keys(cache).forEach((key) => { + const k = (key as any) as keyof T; + const item = cache[k]; + if (item && item.time) { + const now = new Date().getTime(); + const expire = now + item.time * 1000; + if (expire > now) { + this.set(k, item.value, expire); + } + } + }); + } + + clear() { + Object.keys(this.cache).forEach((key) => { + const item = this.cache[key]; + item.timeoutId && clearTimeout(item.timeoutId); + }); + this.cache = {}; + } +} diff --git a/src/utils/cache/persistent.ts b/src/utils/cache/persistent.ts index 75f0fc2c24e..184237ad3b6 100644 --- a/src/utils/cache/persistent.ts +++ b/src/utils/cache/persistent.ts @@ -1,130 +1,109 @@ -import { createStorage } from '/@/utils/cache'; - -import { BASE_LOCAL_CACHE_KEY, BASE_SESSION_CACHE_KEY } from '/@/enums/cacheEnum'; - -const ls = createStorage(localStorage); -const ss = createStorage(); - -interface CacheStore { - local: Recordable; - session: Recordable; +import { createPersistentStorage } from '/@/utils/cache'; +import { Memory } from './memory'; +import { + TOKEN_KEY, + USER_INFO_KEY, + ROLES_KEY, + LOCK_INFO_KEY, + PROJ_CFG_KEY, + APP_LOCAL_CACHE_KEY, + APP_SESSION_CACHE_KEY, +} from '/@/enums/cacheEnum'; +import { DEFAULT_CACHE_TIME } from '/@/settings/encryptionSetting'; +import { toRaw } from 'vue'; + +interface BasicStore { + [TOKEN_KEY]: string | number | null | undefined; + [USER_INFO_KEY]: Recordable; + [ROLES_KEY]: Recordable; + [LOCK_INFO_KEY]: Recordable; + [PROJ_CFG_KEY]: Recordable; } -/** - * @description: Persistent cache - */ -const cacheStore: CacheStore = { - // localstorage cache - local: {}, - // sessionstorage cache - session: {}, -}; - -function initCache() { - cacheStore.local = ls.get(BASE_LOCAL_CACHE_KEY) || {}; - cacheStore.session = ss.get(BASE_SESSION_CACHE_KEY) || {}; -} +type LocalStore = BasicStore; -initCache(); +type SessionStore = BasicStore; -export function setLocal(key: string, value: any, immediate = false) { - const local = ls.get(BASE_LOCAL_CACHE_KEY)?.[BASE_LOCAL_CACHE_KEY] || {}; +export type BasicKeys = keyof BasicStore; +type LocalKeys = keyof LocalStore; +type SessionKeys = keyof SessionStore; - cacheStore.local[BASE_LOCAL_CACHE_KEY] = - { ...local, ...cacheStore.local[BASE_LOCAL_CACHE_KEY] } || {}; - cacheStore.local[BASE_LOCAL_CACHE_KEY][key] = value; +const ls = createPersistentStorage(localStorage); +const ss = createPersistentStorage(sessionStorage); - if (immediate) { - ls.set(BASE_LOCAL_CACHE_KEY, cacheStore.local); - } -} +const localMemory = new Memory(DEFAULT_CACHE_TIME); +const sessionMemory = new Memory(DEFAULT_CACHE_TIME); -export function getLocal(key: string): T | null { - try { - return cacheStore.local[BASE_LOCAL_CACHE_KEY][key]; - } catch (error) { - return null; - } +function initMemory() { + const localCache = ls.get(APP_LOCAL_CACHE_KEY); + const sessionCache = ls.get(APP_SESSION_CACHE_KEY); + localCache && localMemory.resetCache(localCache); + sessionCache && sessionMemory.resetCache(sessionCache); } - -export function removeLocal(key: string) { - if (cacheStore.local[BASE_LOCAL_CACHE_KEY]) { - Reflect.deleteProperty(cacheStore.local[BASE_LOCAL_CACHE_KEY], key); +initMemory(); +export class Persistent { + static getLocal(key: LocalKeys) { + return localMemory.get(key)?.value as Nullable; } -} - -export function clearLocal(immediate = false) { - cacheStore.local = {}; - immediate && ls.remove(BASE_LOCAL_CACHE_KEY); -} - -export function setSession(key: string, value: any, immediate = false) { - const session = ss.get(BASE_SESSION_CACHE_KEY)?.[BASE_SESSION_CACHE_KEY] || {}; - cacheStore.session[BASE_SESSION_CACHE_KEY] = - { ...session, ...cacheStore.session[BASE_SESSION_CACHE_KEY] } || {}; + static setLocal(key: LocalKeys, value: LocalStore[LocalKeys], immediate = false): void { + localMemory.set(key, toRaw(value)); + immediate && ls.set(APP_LOCAL_CACHE_KEY, localMemory.getCache); + } - cacheStore.session[BASE_SESSION_CACHE_KEY][key] = value; + static removeLocal(key: LocalKeys): void { + localMemory.remove(key); + } - if (immediate) { - ss.set(BASE_SESSION_CACHE_KEY, cacheStore.session); + static clearLocal(): void { + localMemory.clear(); } -} -export function removeSession(key: string) { - if (cacheStore.session[BASE_SESSION_CACHE_KEY]) { - Reflect.deleteProperty(cacheStore.session[BASE_SESSION_CACHE_KEY], key); + static getSession(key: SessionKeys) { + return sessionMemory.get(key)?.value as Nullable; } -} -export function getSession(key: string): T | null { - try { - return cacheStore.session[BASE_SESSION_CACHE_KEY][key]; - } catch (error) { - return null; + static setSession(key: SessionKeys, value: SessionStore[SessionKeys], immediate = false): void { + sessionMemory.set(key, toRaw(value)); + immediate && ss.set(APP_SESSION_CACHE_KEY, localMemory); } -} -export function clearSession(immediate = false) { - cacheStore.session = {}; - immediate && ss.remove(BASE_SESSION_CACHE_KEY); -} + static removeSession(key: SessionKeys): void { + sessionMemory.remove(key); + } + static clearSession(): void { + sessionMemory.clear(); + } -export function clearAll() { - clearLocal(); - clearSession(); + static clearAll() { + sessionMemory.clear(); + localMemory.clear(); + } } -export function persistentCache() { - const localCache = cacheStore.local; - const sessionCache = cacheStore.session; - ls.set(BASE_LOCAL_CACHE_KEY, localCache); - ss.set(BASE_SESSION_CACHE_KEY, sessionCache); -} +window.addEventListener('beforeunload', function () { + ls.set(APP_LOCAL_CACHE_KEY, localMemory.getCache); + ss.set(APP_SESSION_CACHE_KEY, sessionMemory.getCache); +}); -(() => { - // /** Write to local before closing window */ - window.addEventListener('beforeunload', () => { - persistentCache(); - }); +function storageChange(e: any) { + const { key, newValue, oldValue } = e; - function storageChange(e: any) { - const { key, newValue, oldValue } = e; + if (!key) { + Persistent.clearAll(); + return; + } - if (!key) { - clearAll(); - return; + if (!!newValue && !!oldValue) { + if (APP_LOCAL_CACHE_KEY === key) { + Persistent.clearLocal(); } - - if (!!newValue && !!oldValue) { - if (BASE_LOCAL_CACHE_KEY === key) { - clearLocal(); - } - if (BASE_SESSION_CACHE_KEY === key) { - clearSession(); - } + if (APP_SESSION_CACHE_KEY === key) { + Persistent.clearSession(); } } +} + +window.addEventListener('storage', storageChange); - window.addEventListener('storage', storageChange); -})(); +export default {}; diff --git a/yarn.lock b/yarn.lock index 0752b4f965c..976235e1efe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,43 +1123,43 @@ resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.308.tgz#162210182c14af4eb217f19e1a1707b787aca2aa" integrity sha512-zoVnvr5A1tpuTCzuw5EvRcWYV5rcmWLGLhEzg9+SuRAXWyT2st0ShF8hYbeHzm+MJHhJWodHVfsTu2DkshMX2g== -"@intlify/core-base@9.0.0-rc.8": - version "9.0.0-rc.8" - resolved "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.0.0-rc.8.tgz#674b88c313cbe471bb66f52dd0907106b01e1c38" - integrity sha512-Nwj2GTZN7gOiN7uGgAeaaJAho/UamkXTheMrdjLrj7FPjE3d1oiSeB3fBgobJxzpyBRjhmjUmpPCEs1afokSxQ== - dependencies: - "@intlify/message-compiler" "9.0.0-rc.8" - "@intlify/message-resolver" "9.0.0-rc.8" - "@intlify/runtime" "9.0.0-rc.8" - "@intlify/shared" "9.0.0-rc.8" - -"@intlify/message-compiler@9.0.0-rc.8": - version "9.0.0-rc.8" - resolved "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.0.0-rc.8.tgz#b2c291b728858aa6fa57b6329a806c1accc8450b" - integrity sha512-vtKk5z7ovenLUXMGHVUyS+snEYrTpHT4o6bQyjPeEL3BoXcVyHlLKIHXNJ6QzlHVQN8aN1bWyj3rMf9ZKEZF3A== - dependencies: - "@intlify/message-resolver" "9.0.0-rc.8" - "@intlify/shared" "9.0.0-rc.8" +"@intlify/core-base@9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.0.0.tgz#3de223b8532c535d022e5be58f7d56a26d2fb12f" + integrity sha512-dxqakT94EV2bFshG3LENQUPWX9yJFCga1BOwJ6mz7J8LnAYVB9Kxw7NRyE2ybN31USW2IUTQH6WWR1yDbCiefQ== + dependencies: + "@intlify/message-compiler" "9.0.0" + "@intlify/message-resolver" "9.0.0" + "@intlify/runtime" "9.0.0" + "@intlify/shared" "9.0.0" + +"@intlify/message-compiler@9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.0.0.tgz#8a1079f8aebcde33057ce769817691ce27ad3e0d" + integrity sha512-3oiLj+8z6koRYJwknazjilBsrqnJEAJywr/t39MYVy2yPmwOI1+NDfdDwM9U3ioA2RvsQEUICqW8gmjq1YIElw== + dependencies: + "@intlify/message-resolver" "9.0.0" + "@intlify/shared" "9.0.0" source-map "0.6.1" -"@intlify/message-resolver@9.0.0-rc.8": - version "9.0.0-rc.8" - resolved "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.0.0-rc.8.tgz#09382e6390298d6786cc53c483d4240e4654ec17" - integrity sha512-8Qqh23yN3sM/hIZKIgJ1S6a9mNm1LVeUxkjhHdfyGV84P6G3Q9bgwCSenX1BKuUrVUJfK45FUkg87BZnUd2Qpg== +"@intlify/message-resolver@9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.0.0.tgz#0077ec24606b6486d238bdef9044e27729f4782c" + integrity sha512-LVK4cwu1l33yvBy0UQkEdXm6pZUcbbiparobruJXz+U8jRTmYHBprN59j59YKXEKcV43cHfzNveaQIm84bgxvQ== -"@intlify/runtime@9.0.0-rc.8": - version "9.0.0-rc.8" - resolved "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.0.0-rc.8.tgz#be5d1c776bba2678b51c3c0492d4676a910921ca" - integrity sha512-ZK0eZwZQ6wb3nxUPc+WYSebnswSSt/lRJotmaVdcmS+tT9/FFz6PJ9pO0nNFV/cGn0uEGW92buldCiNVKA5aHg== +"@intlify/runtime@9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.0.0.tgz#bf9415ff90c746a9be38a5c32f71cbbe9848eee8" + integrity sha512-UqCKduZezb5/qA+XPRfHVvXoLmhnQ8iKMyCh0Lg3ZwjW2vOMep/AgZU3T9cgESe67r4buPYHs7nOBSHbTdjNxg== dependencies: - "@intlify/message-compiler" "9.0.0-rc.8" - "@intlify/message-resolver" "9.0.0-rc.8" - "@intlify/shared" "9.0.0-rc.8" + "@intlify/message-compiler" "9.0.0" + "@intlify/message-resolver" "9.0.0" + "@intlify/shared" "9.0.0" -"@intlify/shared@9.0.0-rc.8": - version "9.0.0-rc.8" - resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0-rc.8.tgz#0b1b387a3237d4ae95496e8ae60cec267625f55d" - integrity sha512-HH05+lD4A9q6F0VLbGY5eZmmCbfaBMuCSSQXmrGgegtsRVu7WFiUMQLNsouN1UtHabOJC9PQarxKwfTzdHyN6Q== +"@intlify/shared@9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0.tgz#d85b3b5f9033f377c5cf2202cf2459aa49948f36" + integrity sha512-0r4v7dnY8g/Jfx2swUWy2GyfH/WvIpWvkU4OIupvxDTWiE8RhcpbOCVvqpVh/xGi0proHQ/r2Dhc0QSItUsfDQ== "@ls-lint/ls-lint@^1.9.2": version "1.9.2" @@ -1595,10 +1595,10 @@ "@vue/babel-plugin-jsx" "^1.0.3" hash-sum "^2.0.0" -"@vitejs/plugin-vue@^1.1.4": - version "1.1.4" - resolved "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.1.4.tgz#1dd388519b75439b7733601b55238ca691864796" - integrity sha512-cUDILd++9jdhdjpuhgJofQqOabOKe+kTWTE2HQY2PBHEUO2fgwTurLE0cJg9UcIo1x4lHfsp+59S9TBCHgTZkw== +"@vitejs/plugin-vue@^1.1.5": + version "1.1.5" + resolved "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-1.1.5.tgz#fa1e8e5e049c35e213672e33f73fe81706ad5dbe" + integrity sha512-4DV8VPYo8/OR1YsnK39QN16xhKENt2XvcmJxqfRtyz75kvbjBYh1zTSHLp7XsXqv4R2I+fOZlbEBvxosMYLcPA== "@vue/babel-helper-vue-transform-on@^1.0.2": version "1.0.2" @@ -1703,25 +1703,25 @@ resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.0.5.tgz#c131d88bd6713cc4d93b3bb1372edb1983225ff0" integrity sha512-gYsNoGkWejBxNO6SNRjOh/xKeZ0H0V+TFzaPzODfBjkAIb0aQgBuixC1brandC/CDJy1wYPwSoYrXpvul7m6yw== -"@vueuse/core@^4.2.2": - version "4.2.2" - resolved "https://registry.npmjs.org/@vueuse/core/-/core-4.2.2.tgz#ecbba4ba05e0360e9c9079b32e149fac803a1020" - integrity sha512-NMU3Vr4eBiNrPzCoUH5ptNj+DETg85Vtww0OJjaQEXobDTH28gzbLJseqCh4m3NYR92C5qlXRnzhSvWOoR/uLg== +"@vueuse/core@^4.3.0": + version "4.3.0" + resolved "https://registry.npmjs.org/@vueuse/core/-/core-4.3.0.tgz#409d1c8fc0b7fffcf5b5388dfc487762bb936b0c" + integrity sha512-PQ3r6wZDCN3pY+UBB5NLQdRfwiasd8MmWppuzpvNE2Sr8T48gmWXDWw3GG4EHMXnuz5EBfQG+U+1TjSaGaK6/w== dependencies: - "@vueuse/shared" "4.2.2" + "@vueuse/shared" "4.3.0" vue-demi latest -"@vueuse/shared@4.2.2": - version "4.2.2" - resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-4.2.2.tgz#e52ee278b929f028117c0ca1792b24df462bff80" - integrity sha512-yudh4jt0SxaW0i3j2iumI8GTloA8aUpLwGaBw9Xv2rQCdZvOZpXpvpGEz8EsMK793ySs+d5S4/opItlxuzjtSg== +"@vueuse/shared@4.3.0": + version "4.3.0" + resolved "https://registry.npmjs.org/@vueuse/shared/-/shared-4.3.0.tgz#82e05dc2941642814ac6fcbb5f9076c38c052968" + integrity sha512-udc1ADIYwizTK/iSfjZQj6+QDFM099oHuX0Sj/yv0NgE9eSODcesV4zO7PtvmJanzw43hCdvtdGBz8miyRkHCQ== dependencies: vue-demi latest -"@windicss/plugin-utils@0.5.3": - version "0.5.3" - resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.5.3.tgz#5302864cb2f94dd3d71bb5af958dab6ce3f74dab" - integrity sha512-BXNvMSRmi1TyM8j3EnF/li9HViJPN4EPeGKTiIDWemxrfkRNlgN+Gmv31CFtZwnjiAlXRO58B6LIqVTSVYaTfQ== +"@windicss/plugin-utils@0.5.4": + version "0.5.4" + resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.5.4.tgz#69476a9d1fee92046695766bf7fbfe48e48809a7" + integrity sha512-zxpHdTsVZl7TF8A3uAymJCqMRlG83dMRAXf//fXonluoLDSJCuGBJyxN3NdkAyNZZR1L1DvoUUtkZLYOba+ElQ== dependencies: esbuild "^0.8.52" esbuild-register "^2.0.0" @@ -3601,11 +3601,6 @@ esbuild-register@^2.0.0: source-map-support "^0.5.19" strip-json-comments "^3.1.1" -esbuild@^0.8.47: - version "0.8.51" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.51.tgz#1a59f1fee34892f143b7009081f9b4901a564b93" - integrity sha512-MVIom8fgL1+B6iGqWtrG7QJ1gqd64BycxounlsX1kR/IcIITaSlTo7gghKpg4a+bnxkpo0dwcikuvk4MVSA9ww== - esbuild@^0.8.48: version "0.8.48" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.48.tgz#a57e4dde84ec56da1c6ecaefee97e9da6c5b00b5" @@ -8973,20 +8968,20 @@ vite-plugin-theme@^0.4.8: es-module-lexer "^0.3.26" tinycolor2 "^1.4.2" -vite-plugin-windicss@0.5.3: - version "0.5.3" - resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.5.3.tgz#7929b5fbaed7f0530cbe79947e7bc9e4f471b683" - integrity sha512-hVfj0QjgxBch4j5M6BfMj9Dsm7iKioP9uQUvs00RGkuUdG+Gc0PQcT9SuLrcZJjUE/2Tp9+J44BEbOYxjesqlA== +vite-plugin-windicss@0.5.4: + version "0.5.4" + resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.5.4.tgz#35764e91536d596ac2c9266c3e16c546915d8b3e" + integrity sha512-iPLoqfpZdnRIY1AzweumpdE8ILQQnyhywZwJDqFpj8SZ3h43e5tfQFnJb5nS6FLccOsBcCV9JFugD2w6pGyfqg== dependencies: - "@windicss/plugin-utils" "0.5.3" + "@windicss/plugin-utils" "0.5.4" windicss "^2.2.0" -vite@2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/vite/-/vite-2.0.3.tgz#ea0329295d4da9341e670036e5e7f0bfa30ae2cf" - integrity sha512-4CUm3FVUHyTSSSK6vHWkj3SVkP+GGNNzwYcFsHOjjc8xQ3BPjJa1JDDmFlYxpxR29ANa+7RWptYPoyHyJ29Nhw== +vite@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/vite/-/vite-2.0.4.tgz#063532a4139b59a067297d8ebb5960d450907a09" + integrity sha512-+PP89D7AKXFE4gps8c5+4eP5yXTh5qCogjdYX7iSsIxbLZAa26JoGSq6OLk0qdb/fqDh7gtJqGiLbG2V6NvkKQ== dependencies: - esbuild "^0.8.47" + esbuild "^0.8.52" postcss "^8.2.1" resolve "^1.19.0" rollup "^2.38.5" @@ -9010,13 +9005,13 @@ vue-eslint-parser@^7.5.0: esquery "^1.4.0" lodash "^4.17.15" -vue-i18n@9.0.0-rc.8: - version "9.0.0-rc.8" - resolved "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.0.0-rc.8.tgz#36d022516cf2527ce02eecf9de116b978e163da3" - integrity sha512-WQC9q0UG1lbk+naBBoVTrJjHPZfHP6Pid35Ek9AkCxUcXolW1pXUCQg1gIMF8I0obxLd/fSx9GuOWrB/aaU3aQ== +vue-i18n@^9.0.0: + version "9.0.0" + resolved "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.0.0.tgz#a04c41d5ed3d5a068e923517bfaa0abcbc84e174" + integrity sha512-iks0eJDv/4cK/7tl/ooMUroNVVIGOK4kKS1PIHmPQk7QjT/sDfFM84vjPKgpARbw0GjJsOiADL43jufNfs9e9A== dependencies: - "@intlify/core-base" "9.0.0-rc.8" - "@intlify/shared" "9.0.0-rc.8" + "@intlify/core-base" "9.0.0" + "@intlify/shared" "9.0.0" "@vue/devtools-api" "^6.0.0-beta.5" vue-router@^4.0.4: