File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
packages/cloudflare/src/cli/commands Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import type {
12
12
import type { IncrementalCache , TagCache } from "@opennextjs/aws/types/overrides.js" ;
13
13
import { globSync } from "glob" ;
14
14
import { tqdm } from "ts-tqdm" ;
15
- import { getPlatformProxy , unstable_readConfig } from "wrangler" ;
15
+ import { getPlatformProxy , type GetPlatformProxyOptions , unstable_readConfig } from "wrangler" ;
16
16
17
17
import {
18
18
BINDING_NAME as KV_CACHE_BINDING_NAME ,
@@ -92,14 +92,11 @@ export function getCacheAssets(opts: BuildOptions): CacheAsset[] {
92
92
return assets ;
93
93
}
94
94
95
- async function getPlatformProxyEnv (
96
- populateCacheOptions : { target : WranglerTarget ; environment ?: string } ,
97
- envName : keyof CloudflareEnv
98
- ) {
99
- const proxy = await getPlatformProxy < CloudflareEnv > ( populateCacheOptions ) ;
100
- const prefix = proxy . env [ envName ] ;
95
+ async function getPlatformProxyEnv < T extends keyof CloudflareEnv > ( options : GetPlatformProxyOptions , key : T ) {
96
+ const proxy = await getPlatformProxy < CloudflareEnv > ( options ) ;
97
+ const prefix = proxy . env [ key ] ;
101
98
await proxy . dispose ( ) ;
102
- return prefix as string | undefined ;
99
+ return prefix ;
103
100
}
104
101
105
102
async function populateR2IncrementalCache (
You can’t perform that action at this time.
0 commit comments