import { k as Metadata } from "./packem_shared/storage.d-Cnjmzau5.js"; export { B as AbstractBaseStorage, type f as BaseStorageOptions, type l as BatchOperationResponse, type m as BatchOperationResult, type g as ConditionalOptions, type C as ConditionalSupport, type j as CopyConditionalOptions, type D as DiskStorageOptions, type n as DiskStorageWithChecksumOptions, o as ERRORS, p as ErrorMap, type q as ExpirationOptions, F as File, type e as FileInit, type h as FilePart, type i as FileQuery, type L as LocalMetaStorageOptions, r as META_VERSION, M as MetaStorage, type s as MetaStorageOptions, type t as OnComplete, type u as OnCreate, type v as OnDelete, type w as OnError, type x as OnUpdate, type P as PurgeList, type R as RetryConfig, a as UploadError, type b as UploadEventType, type U as UploadFile, type y as UploadPostOptions, type z as UploadPostPolicy, W as WRITE_CLAIM_KEY, d as createRetryWrapper, A as defaultCloudStorageFileNameValidation, G as defaultFilesystemFileNameValidation, H as extractHttpStatus, I as getMetaVersion, J as isRetryableError, K as isUploadError, N as mapStatusToErrorCode, Q as retry, T as setMetaVersion, V as throwErrorCode, X as wrapStorageError } from "./packem_shared/storage.d-Cnjmzau5.js"; export { N as NoOpMetrics } from "./packem_shared/no-op-metrics.d-CqCPyNVL.js"; export { DiskStorage, DiskStorageWithChecksum } from "./storage/local/index.js"; export { L as LocalMetaStorage } from "./packem_shared/local-meta-storage.d-DuAe8gC_.js"; export { MemoryMetaStorage, MemoryStorage, type MemoryStorageOptions } from "./storage/memory/index.js"; export type { H as Header, a as Headers, b as HttpError, c as HttpErrorBody, I as IncomingMessageWithBody, M as Metrics, d as RangeChecksum, e as RangeHasher, f as ResponseBody, R as ResponseBodyType, g as ResponseTuple, U as UploadResponse, V as Validation, h as ValidationError, i as ValidatorConfig } from "./packem_shared/types.d-DFh9698o.js"; export { type AnyWebReadableByteStreamWithFileType, type AnyWebReadableStream, type Detector, type FileTypeOptions, type FileTypeParser, type FileTypeResult, type StreamOptions, type TokenizerPositionError, fileTypeFromBlob, fileTypeFromBuffer, fileTypeFromTokenizer, supportedExtensions, supportedMimeTypes } from 'file-type'; import { F as Files, S as SyncOptions, a as SyncResult, T as TransferOptions, b as TransferResult } from "./packem_shared/files.d-DJcRVSlV.js"; export { type B as BulkDeleteResult, type c as BulkDownloadOptions, type d as BulkDownloadResult, type e as BulkError, type f as BulkExistsResult, type g as BulkHeadResult, type h as BulkMoveItem, type i as BulkMoveResult, type j as BulkOptions, type k as BulkUploadItem, type l as BulkUploadOptions, type m as BulkUploadResult, type C as CopyOptions, type D as DeleteOptions, type n as DownloadOptions, type o as DownloadRange, type p as DownloadResult, type q as DownloadStreamResult, type r as FileBody, type s as FileObject, type t as FilesHooks, type u as FilesOptions, type H as HeadOptions, type v as HookActionType, type w as HookEvent, type I as IfMatchOptions, type L as ListAllOptions, type x as ListDirectoryResult, type y as ListOptions, type M as MultipartOptions, type z as SearchMatch, type A as SearchOptions, type E as SignedReadUrlOptions, type G as SignedUpload, type J as SignedUploadOptions, type K as SignedUploadUrlOptions, type N as StorageCapabilities, type O as SyncProgress, type P as TransferProgress, U as UploadControl, type Q as UploadControlState, type R as UploadControlToken, type V as UploadOptions, type W as UploadProgress, type X as UploadProgressCallback } from "./packem_shared/files.d-DJcRVSlV.js"; import 'node:stream'; import 'lru-cache'; import 'node:crypto'; import 'node:http'; /** * Streams every object from `source` to `destination` for cross-provider migration. * Built entirely on the public {@link Files} surface — no adapter implements anything new. * * Each object is downloaded and re-uploaded with bounded concurrency. By default missing * destination keys are uploaded and existing keys are skipped — pass `overwrite: true` to force * re-upload. Body, content type, and user metadata travel; `etag`/`lastModified` are * destination-assigned. * * Like the other bulk methods, `transfer` doesn't throw on partial failure: results come back as * `{ transferred, skipped, errors? }`. With `stopOnError: true` the first failure rejects instead. * Each call reports one `transfer` hook event (`keys` = transferred source keys) through the * destination's `hooks.onAction` / `hooks.onError`. * @example * ```ts * const from = new Files({ adapter: new S3Storage({ bucket: "old", ... }) }); * const to = new Files({ adapter: new GCSStorage({ bucket: "new", ... }) }); * * const { transferred, skipped, errors } = await transfer(from, to, { * prefix: "uploads/", * onProgress: ({ done, key, status }) => console.log(done, key, status), * }); * ``` */ declare const transfer: (source: Files, destination: Files, options?: TransferOptions) => Promise; /** * Incremental, optionally-pruning mirror from `source` to `destination`. Built entirely on the * public {@link Files} surface — no adapter implements anything new. * * Each source object is compared against its destination counterpart (by size, then etag — only * when both sides use the same adapter class — then modification time) and only copied when * missing or differing; matching objects are skipped. With `prune: true`, destination keys absent * from the source are deleted afterwards (full mirror); `prune` rejects when combined with * `transformKey`. * Pass `dryRun: true` to compute the plan without writing. * * Like the other bulk methods, `sync` doesn't throw on partial failure: results come back as * `{ uploaded, updated, unchanged, deleted, errors? }`. * @example * ```ts * const from = new Files({ adapter: new S3Storage({ bucket: "primary", ... }) }); * const to = new Files({ adapter: new GCSStorage({ bucket: "mirror", ... }) }); * * // Preview first… * const plan = await sync(from, to, { prefix: "assets/", prune: true, dryRun: true }); * // …then apply. * const result = await sync(from, to, { prefix: "assets/", prune: true }); * ``` */ declare const sync: (source: Files, destination: Files, options?: SyncOptions) => Promise; /** * Parse TUS protocol metadata string into object. * * Follows the spec: pairs are comma separated, each pair is a key and an optional base64 value * separated by a single space. Keys MUST NOT be empty or contain spaces/commas and MUST be * unique; a malformed header is rejected with `400 Bad Request`. Empty pairs (e.g. from a * trailing comma) are ignored. * @param encoded Base64-encoded metadata string (optional, defaults to empty string) * @returns Parsed metadata object with decoded values * @throws {HttpError} 400 when the header is malformed */ declare const parseMetadata: (encoded?: string) => Metadata; /** * Wait for storage to be ready before handling requests. * This ensures storage initialization (e.g., AWS S3, GCS) completes before processing uploads. * @param storage Storage instance with isReady property and an optional ensureReady access check * @param timeoutMs Maximum time to wait in milliseconds (default: 5000) * @throws Error if storage doesn't become ready within timeout, or the ensureReady check's own error */ declare const waitForStorage: (storage: { ensureReady?: () => Promise; isReady: boolean; }, timeoutMs?: number) => Promise; export { Files, Metadata, type SyncOptions, type SyncResult, type TransferOptions, type TransferResult, parseMetadata as parseTusMetadata, sync, transfer, waitForStorage };