fix: work around hotfix cloudflare kv storage bug (#1650)
This commit is contained in:
parent
6dc38c7d8e
commit
6e7ac24821
2 changed files with 195 additions and 3 deletions
|
@ -1,8 +1,6 @@
|
|||
// @ts-expect-error unstorage needs to provide backwards-compatible subpath types
|
||||
import _fs from 'unstorage/drivers/fs'
|
||||
// @ts-expect-error unstorage needs to provide backwards-compatible subpath types
|
||||
import _kv from 'unstorage/drivers/cloudflare-kv-http'
|
||||
// @ts-expect-error unstorage needs to provide backwards-compatible subpath types
|
||||
import _memory from 'unstorage/drivers/memory'
|
||||
|
||||
import { stringifyQuery } from 'ufo'
|
||||
|
@ -11,6 +9,7 @@ import { $fetch } from 'ofetch'
|
|||
import type { Storage } from 'unstorage'
|
||||
|
||||
import cached from './cache-driver'
|
||||
import kv from './cloudflare-driver'
|
||||
|
||||
// @ts-expect-error virtual import
|
||||
import { env } from '#build-info'
|
||||
|
@ -21,7 +20,6 @@ import type { AppInfo } from '~/types'
|
|||
import { APP_NAME } from '~/constants'
|
||||
|
||||
const fs = _fs as typeof import('unstorage/dist/drivers/fs')['default']
|
||||
const kv = _kv as typeof import('unstorage/dist/drivers/cloudflare-kv-http')['default']
|
||||
const memory = _memory as typeof import('unstorage/dist/drivers/memory')['default']
|
||||
|
||||
const storage = useStorage() as Storage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue