import { Context, HttpClientRequestOptions, HttpClientResponse } from 'egg'; import { AbstractService } from '../../common/AbstractService.ts'; import type { AbbreviatedPackageJSONType, AbbreviatedPackageManifestType, PackageJSONType, PackageManifestType } from '../../repository/PackageRepository.ts'; import { DIST_NAMES } from '../entity/Package.ts'; import { type CreateUpdateProxyCacheTask, type UpdateProxyCacheTaskOptions, Task } from '../entity/Task.ts'; type GetSourceManifestAndCacheReturnType = T extends DIST_NAMES.ABBREVIATED | DIST_NAMES.MANIFEST ? AbbreviatedPackageJSONType | PackageJSONType : T extends DIST_NAMES.FULL_MANIFESTS | DIST_NAMES.ABBREVIATED_MANIFESTS ? AbbreviatedPackageManifestType | PackageManifestType : never; export declare class ProxyCacheService extends AbstractService { private readonly httpClient; private readonly npmRegistry; private readonly nfsAdapter; private readonly proxyCacheRepository; private readonly registryManagerService; private readonly taskService; private readonly cacheService; private readonly backgroundTaskHelper; getPackageVersionTarResponse(fullname: string, ctx: Context): Promise; getPackageManifest(fullname: string, fileType: DIST_NAMES.FULL_MANIFESTS | DIST_NAMES.ABBREVIATED_MANIFESTS): Promise; getPackageVersionManifest(fullname: string, fileType: DIST_NAMES.ABBREVIATED | DIST_NAMES.MANIFEST, versionOrTag: string): Promise; removeProxyCache(fullname: string, fileType: DIST_NAMES, version?: string): Promise; replaceTarballUrl(manifest: GetSourceManifestAndCacheReturnType, fileType: T): GetSourceManifestAndCacheReturnType; createTask(targetName: string, options: UpdateProxyCacheTaskOptions): Promise; findExecuteTask(): Promise | null>; executeTask(task: Task): Promise; private getRewrittenManifest; private storeRewrittenManifest; getProxyResponse(ctx: Partial, options?: HttpClientRequestOptions): Promise; } export {};