import { S3Client } from '@aws-sdk/client-s3'; import { FsAwsS3 } from '@chunkd/fs-aws'; import { SourceCache, SourceChunk } from '@chunkd/middleware'; import type { SourceCallback, SourceRequest } from '@chunkd/source'; /** Exported for testing */ export declare const s3Config: { client: S3Client; getSignedUrl: (client: import("@aws-sdk/client-s3").__Client, command: import("@aws-sdk/client-s3").$Command, options?: import("@smithy/types").RequestPresigningArguments) => Promise; }; export declare const s3Fs: FsAwsS3; export declare const s3FsPublic: FsAwsS3; /** * Sign a GET request to S3 for one hour * @param target s3 location to presign * @returns */ export declare function signS3Get(target: URL): Promise; export declare const Fsa: import("@chunkd/fs/build/src/file.system.abstraction.js").FileSystemAbstraction; export declare const FsaChunk: SourceChunk; export declare const FsaCache: SourceCache; export declare const FsaLog: { name: string; count: number; requests: string[]; fetch(req: SourceRequest, next: SourceCallback): Promise; reset(): void; }; /** * Middleware to cache responses locally into .cache/ * * very useful when developing with remote sources as it avoids repeatedly downloading the same data */ export declare const FsaLocalCache: { name: string; remotes: Set; fetch(req: SourceRequest, next: SourceCallback): Promise; }; /** * When chunkd moves to URLs this can be removed * * But reading a file as a string with `file://....` does not work in node * it needs to be converted with `fileURLToPath` */ export declare function urlToString(u: URL): string; /** * Ensure a folder has a trailing slash **/ export declare function stringToUrlFolder(str: string): URL;