@@ -38,12 +38,12 @@ export async function internalFetchRaw(
3838/** Wraps the basic implementation to inject internal fetch method and the correct token. */
3939export async function internalFetchManifest (
4040 state : RegistryProviderState ,
41- { verbose } : { verbose ?: ( msg : string ) => void } = { }
41+ { verbose, noCache } : { verbose ?: ( msg : string ) => void ; noCache ?: boolean } = { }
4242) {
4343 return await fetchManifest ( state , {
4444 verbose,
4545 // @ts -expect-error it's fine
46- fetch : iFetch ,
46+ fetch : ( input , init ) => iFetch ( input , { ... init , cache : noCache ? 'reload' : undefined } ) ,
4747 token : getProviderToken ( state . provider , state . url ) ,
4848 } ) ;
4949}
@@ -148,13 +148,13 @@ export async function forEachPathGetProviderState(
148148 */
149149export async function fetchBlocks (
150150 repos : RegistryProviderState [ ] ,
151- { verbose } : { verbose ?: ( msg : string ) => void } = { }
151+ { verbose, noCache } : { verbose ?: ( msg : string ) => void ; noCache ?: boolean } = { }
152152) : Promise < Result < Map < string , RemoteBlock > , { message : string ; repo : string } > > {
153153 const blocksMap = new Map < string , RemoteBlock > ( ) ;
154154
155155 const errors = await Promise . all (
156156 repos . map ( async ( state ) => {
157- const getManifestResult = await internalFetchManifest ( state , { verbose } ) ;
157+ const getManifestResult = await internalFetchManifest ( state , { verbose, noCache } ) ;
158158
159159 if ( getManifestResult . isErr ( ) ) {
160160 return Err ( { message : getManifestResult . unwrapErr ( ) , repo : state . url } ) ;
@@ -213,13 +213,13 @@ export type FetchManifestResult = {
213213 */
214214export async function fetchManifests (
215215 repos : RegistryProviderState [ ] ,
216- { verbose } : { verbose ?: ( msg : string ) => void } = { }
216+ { verbose, noCache } : { verbose ?: ( msg : string ) => void ; noCache ?: boolean } = { }
217217) : Promise < Result < FetchManifestResult [ ] , { message : string ; repo : string } > > {
218218 const manifests : FetchManifestResult [ ] = [ ] ;
219219
220220 const errors = await Promise . all (
221221 repos . map ( async ( state ) => {
222- const getManifestResult = await internalFetchManifest ( state , { verbose } ) ;
222+ const getManifestResult = await internalFetchManifest ( state , { verbose, noCache } ) ;
223223
224224 if ( getManifestResult . isErr ( ) ) {
225225 return Err ( { message : getManifestResult . unwrapErr ( ) , repo : state . url } ) ;
0 commit comments