Skip to content

Commit

Permalink
fix: get storage mounts type from unstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jun 29, 2022
1 parent c9577a3 commit 134f89f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"ufo": "^0.8.4",
"unenv": "^0.5.2",
"unimport": "^0.4.0",
"unstorage": "^0.5.2"
"unstorage": "^0.5.3"
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "^10.0.0",
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions src/types/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { NestedHooks, Hookable } from 'hookable'
import type { Consola, LogLevel } from 'consola'
import type { WatchOptions } from 'chokidar'
import type { RollupCommonJSOptions } from '@rollup/plugin-commonjs'
import type { Storage } from 'unstorage'
import type { Storage, BuiltinDriverName } from 'unstorage'
import type { NodeExternalsOptions } from '../rollup/plugins/externals'
import type { RollupConfig } from '../rollup/config'
import type { Options as EsbuildOptions } from '../rollup/plugins/esbuild'
Expand Down Expand Up @@ -41,11 +41,10 @@ export interface NitroHooks {
'prerender:route': (route: PrerenderRoute) => HookResult
}

type CustomDriverName = string & { _custom?: any }

export interface StorageMounts {
[path: string]: {
driver: 'fs' | 'http' | 'memory' | 'redis' | 'cloudflare-kv',
[option: string]: any
}
[path: string]: { driver: BuiltinDriverName | CustomDriverName, [option: string]: any }
}

type DeepPartial<T> = T extends Record<string, any> ? { [P in keyof T]?: DeepPartial<T[P]> | T[P] } : T
Expand Down

0 comments on commit 134f89f

Please sign in to comment.