chore(deps): update devdependencies (#2163)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
This commit is contained in:
renovate[bot] 2023-07-03 01:11:13 +08:00 committed by GitHub
parent 676470bae2
commit 5f2dca1979
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 812 additions and 656 deletions

View file

@ -12,7 +12,7 @@
"theme-colors": "^0.0.5" "theme-colors": "^0.0.5"
}, },
"devDependencies": { "devDependencies": {
"@nuxt-themes/docus": "^1.12.0", "@nuxt-themes/docus": "^1.13.0",
"nuxt": "^3.5.2" "nuxt": "^3.6.1"
} }
} }

View file

@ -103,7 +103,7 @@
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "^0.39.6", "@antfu/eslint-config": "^0.39.6",
"@antfu/ni": "^0.21.3", "@antfu/ni": "^0.21.4",
"@types/chroma-js": "^2.4.0", "@types/chroma-js": "^2.4.0",
"@types/file-saver": "^2.0.5", "@types/file-saver": "^2.0.5",
"@types/flat": "^5.0.2", "@types/flat": "^5.0.2",
@ -112,14 +112,14 @@
"@types/js-yaml": "^4.0.5", "@types/js-yaml": "^4.0.5",
"@types/prettier": "^2.7.3", "@types/prettier": "^2.7.3",
"@types/wicg-file-system-access": "^2020.9.6", "@types/wicg-file-system-access": "^2020.9.6",
"@unlazy/nuxt": "^0.8.9", "@unlazy/nuxt": "^0.9.0",
"bumpp": "^9.1.0", "bumpp": "^9.1.1",
"consola": "^3.1.0", "consola": "^3.2.2",
"eslint": "^8.44.0", "eslint": "^8.44.0",
"flat": "^5.0.2", "flat": "^5.0.2",
"fs-extra": "^11.1.1", "fs-extra": "^11.1.1",
"lint-staged": "^13.2.2", "lint-staged": "^13.2.3",
"nuxt": "3.5.2", "nuxt": "3.6.1",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"sharp": "^0.32.1", "sharp": "^0.32.1",
"sharp-ico": "^0.1.5", "sharp-ico": "^0.1.5",

File diff suppressed because it is too large Load diff

View file

@ -14,12 +14,12 @@ export default defineDriver((driver: Driver = memory()) => {
if (await memoryDriver.hasItem(key)) if (await memoryDriver.hasItem(key))
return true return true
return driver.hasItem(key) return driver.hasItem(key, {})
}, },
async setItem(key: string, value: any) { async setItem(key: string, value: any) {
await Promise.all([ await Promise.all([
memoryDriver.setItem(key, value), memoryDriver.setItem(key, value),
driver.setItem?.(key, value), driver.setItem?.(key, value, {}),
]) ])
}, },
async getItem(key: string) { async getItem(key: string) {

View file

@ -3,7 +3,6 @@ import memory from 'unstorage/drivers/memory'
import kv from 'unstorage/drivers/cloudflare-kv-http' import kv from 'unstorage/drivers/cloudflare-kv-http'
import { $fetch } from 'ofetch' import { $fetch } from 'ofetch'
import type { Storage } from 'unstorage'
import cached from '../cache-driver' import cached from '../cache-driver'
@ -16,7 +15,7 @@ import { driver } from '#storage-config'
import type { AppInfo } from '~/types' import type { AppInfo } from '~/types'
import { APP_NAME } from '~/constants' import { APP_NAME } from '~/constants'
const storage = useStorage() as Storage const storage = useStorage<AppInfo>()
if (driver === 'fs') { if (driver === 'fs') {
const config = useRuntimeConfig() const config = useRuntimeConfig()
@ -58,7 +57,7 @@ export async function getApp(origin: string, server: string) {
try { try {
if (await storage.hasItem(key)) if (await storage.hasItem(key))
return await storage.getItem(key) as Promise<AppInfo> return (storage.getItem(key, {}) as Promise<AppInfo>)
const appInfo = await fetchAppInfo(origin, server) const appInfo = await fetchAppInfo(origin, server)
await storage.setItem(key, appInfo) await storage.setItem(key, appInfo)
return appInfo return appInfo